Skip to content

DeleteMapObject

Takes a map object off the level for everyone.

DeleteMapObject(id)
Parameter Type
id number the object

boolean - true; false and the reason when there is no such object

for _, o in ipairs(GetMapObjectsNear(x, y, z, 10)) do
if o.group == "barricade" then DeleteMapObject(o.id) end
end

CreateMapObject · GetMapObjectsNear · the The server’s map group of the index