respawnObject | Multi Theft Auto: Wiki Skip to content

respawnObject

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function respawns a specific object.

Syntax

respawnObject ( )

Code Examples

server

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

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