update
unknown
lua
3 years ago
1.0 kB
5
Indexable
--Details Hider Script, created by Riddy-- local buffer = {} -- Buffer for storing destroyed object function destroyObjects(cmd) if (not cmd) then return false end if #buffer == 0 then for i, v in ipairs(getElementsByType("object")) do if getElementModel(v) == 728 then --object id local x, y, z = getElementPosition(v) local rx, ry, rz = getElementRotation(v) table.insert(buffer, i, {x, y, z, rx, ry, rz}) if isElement(v) then destroyElement(v) end end end outputChatBox("destroy") return true end for i, v in ipairs(buffer) do local x, y, z, rx, ry, rz = unpack(v) createObject(728, x, y, z, rx, ry, rz) end outputChatBox("create") buffer = {} end addCommandHandler("destroy", destroyObjects) function onPlayerJoin() bindKey("k", "up", "destroy") end addEventHandler("onClientResourceStart", root, onPlayerJoin)
Editor is loading...