local blockCreate = false
function createBarrier(thePlayer)
if (blockCreate ~= true) then
local x, y, z = getElementPosition(thePlayer)
barrierObject = createObject(1225, x-1, y, z-0.6)
if (barrierObject ~= false) then
blockCreate = true
end
if (isPedInVehicle(thePlayer)) then
end
else
outputChatBox("Creating barrier blocked, delete your existing one first.")
end
end
addCommandHandler("explosivo", createBarrier)
function deleteBarrier(thePlayer)
if (isElement(barrierObject)) then
destroyElement(barrierObject)
blockCreate = false
else
outputChatBox("Nao existe nenhum explosivo criado!", thePlayer, 250, 0, 0)
end
end
addCommandHandler("removerexplosivo", deleteBarrier)