Search the Community
Showing results for tags 'zone'.
-
local Z1 = createColRectangle(1577, 1723, 60, 140 ) function spawnRoadblock(id, x, y, z, rx, ry, rz, dim, int) if (not id) then return end if ( id =="" and dim == 0) then return true end if (id == 978) then z = z-1 end local accName = getAccountName(getPlayerAccount(client)) local object = createObject(tonumber(id), x, y, z, rx, ry, rz) setElementDoubleSided(object, true) setElementFrozen(object, true) setElementData(object, "creator", accName, false) roadblocks[object] = {object, getAccountName(getPlayerAccount(client))} if (tonumber(dim) ~= 0) then setElementDimension(object, dim) end if (tonumber(int) ~= 0) then setElementInterior(object, int) end if (id ~= 1225) then triggerClientEvent(client, "nobreak", client, object) end end addEvent("events.RB.AddRoadblock", true) addEventHandler("events.RB.AddRoadblock", root, spawnRoadblock) ____________________________________________________________________________________________________________________________ i want to add on it, if Client placed a Object outside Z1 it will not get placed, and if it placed inside the Z1 it will be placed, Please can someone help, and i appreciate that! thank you.