isObjectRespawnable | Multi Theft Auto: Wiki Skip to content

isObjectRespawnable

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 checks if the object has respawn enabled, which can be toggled using toggleObjectRespawn.

Syntax

isObjectRespawnable ( )

Code Examples

server
addCommandHandler('checkobjects', function()
local count = 0
for k,v in ipairs(getElementsByType('object')) do
if (isObjectRespawnable(v)) then
count = count + 1
end
end
outputChatBox(count..' objects on map are respawnable!')
end)