RespawnObject

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function respawns a specific object.

Syntax

bool respawnObject ( object theObject )

OOP Syntax Help! I don't understand this!

Method: object:respawn(...)


Required Arguments

Returns

  • true if the object was sucessfully respawned.
  • false if the object is not breakable, or a wrong object was given.

Example

This example prevents objects from despawning. When an object breaks, it gets respawned right away.

addEventHandler ( "onClientObjectBreak", getRootElement(),
    function ()
        respawnObject ( source )
    end
)

See Also