CityRP Documentation Repository

core.plugins.perma_ents.sv_init

Fixed Entity Spawning System.

Functions

ServerDeleteMapEntity(id, regMap)Source ☍

Delete a map entity on startup based on its map creation ID.

Parameters

  • idanyMap creation ID to delete.
  • regMapanyOptional argument to specify a map to spawn on. If nil, replaced with the last SetDefaultMap argument.
ServerRegisterPermanentEntity(class, position, angle, regMap)Source ☍

Register a permanent entity.

Parameters

  • classanyThe class of the entity.
  • positionanyThe position of the entity to be spawned at. Alternatly, can also take a table containing the save-data.
  • angleanyThe angle of the entity.
  • regMapanyOptional argument to specify a map to spawn on. If nil, replaced with the last SetDefaultMap argument.

Fields

Servercityrp.permaentsSource ☍

Exposed read-only for perma_ents_devtool's "detect existing config" step. Registration below is what these tables are for; do not mutate them from outside this file.

Servercityrp.permaents.deleteTabSource ☍
Servercityrp.permaents.entTabSource ☍