Library props
Prop spawning library.
Functions
| canCreate() | Returns whether a prop can be created. |
| create( model, pos, ang, dontUndo ) | Creates a prop_physics entity with the given model. |
| createVehicleSeat( model, pos, ang, dontUndo ) | Creates a vehicle seat with the given model. |
| deleteOnShutdown( shouldDelete ) | Sets whether props/vehicle seats should be deleted when the instance shuts down (either from error or chip removal). |
| getAll() | Returns a table containing every prop/vehicle seat you have spawned with props.create()/props.createVehicleSeat(). |
| removeAll() | Removes every prop/vehicle seat you have created with props.create()/props.createVehicleSeat(). |
Functions
- props.canCreate()
-
Returns whether a prop can be created.
Environment:
Server - props.create( model, pos, ang, dontUndo )
-
Creates a prop_physics entity with the given model. Can optionally place it at a given position, and set its angles. This requires the SPAWN_ENTITY permission when running in restricted mode (e.g. executed from the shared area).
Environment:
ServerParameters:
-
model: The model to give the prop. -
pos: Optional starting position. -
ang: Optional starting angles. -
dontUndo: If true, then the prop will not be added to your undo list.
Return values:
-
(Entity)The created prop entity, or nil if creation failed. -
(string)If creation failed, the reason why.
-
- props.createVehicleSeat( model, pos, ang, dontUndo )
-
Creates a vehicle seat with the given model. Can optionally place it at a given position, and set its angles. This requires the SPAWN_ENTITY permission when running in restricted mode (e.g. executed from the shared area).
Environment:
ServerParameters:
-
model: The model to give the vehicle (must be a valid seat model, see the vehicles tab of the spawnmenu). -
pos: Optional starting position. -
ang: Optional starting angles. -
dontUndo: If true, then the vehicle will not be added to your undo list.
Return values:
-
(Entity)The created vehicle entity, or nil if creation failed. -
(string)If creation failed, the reason why.
-
- props.deleteOnShutdown( shouldDelete )
-
Sets whether props/vehicle seats should be deleted when the instance shuts down (either from error or chip removal).
Environment:
ServerParameters:
-
shouldDelete: Whether all props/vehicle seats spawned by this instance be deleted on shutdown.
-
- props.getAll()
-
Returns a table containing every prop/vehicle seat you have spawned with props.create()/props.createVehicleSeat().
Environment:
Server - props.removeAll()
-
Removes every prop/vehicle seat you have created with props.create()/props.createVehicleSeat().
Environment:
Server