- Documentation
- Server functions
- toggleObjectRespawn
Function
toggleObjectRespawn
Turns an object's respawn on or off. When turned on it stores the current position and rotation that respawnObject returns to.
Syntax
bool toggleObjectRespawn(object theObject, bool respawn)Arguments
theObjectobject- The object.
respawnbooltrue= the object can respawn.
Returns
true on success.
Example
local obj = createObject(1225, 0, 0, 3, 0, 0, 0, true)
toggleObjectRespawn(obj, true)