client.lua
setTimer ( function ()
local theCol = getElementData(root, "BlockExportCol")
function isInColExport ()
if isElement(theCol) and isElementWithinColShape(localPlayer,theCol) then
return true else return false
end
end
function ClientExplosionCFunction()
if isInColExport () then
cancelEvent ()
end
end
addEventHandler("onClientExplosion", root, ClientExplosionCFunction)
end , 1000, 1 )
shared.lua
BlockVehicle = createColCuboid ( 1573.84900,-1637.5,12, 10,6,6 )
setElementData(root, "BlockExportCol", BlockVehicle)
I want to block vehicles in more areas how can I do it?