Lua
allesperren = { }
function loeschen(source,command)
for index, roadb in ipairs( allesperren ) do
if isCop(player) or isFBI(player) or isArmy(player) or isswat(player) then
destroyElement( roadb )
end
outputChatBox("Die Sperren wurden entfernt!",source,255,255,0)
end
addCommandHandler("delsperren",loeschen)
function barricade(source,command)
local x,y,z = getElementPosition(source)
local rotX,rotY,rotZ = getElementRotation(source)
if isCop(player) or isFBI(player) or isArmy(player) or isswat(player) then
table.insert(allesperren, createObject(1422,x,y,z-0.15,0,0,rotZ) )
setElementPosition ( source, x, y, z+0.5 )
outputChatBox("Barricade erstellt!",source,255,255,0)
end
addCommandHandler("barricade",barricade)
function sandbag(source,command)
local x,y,z = getElementPosition(source)
local rotX,rotY,rotZ = getElementRotation(source)
if isCop(player) or isFBI(player) or isArmy(player) or isswat(player) then
table.insert(allesperren, createObject(2060,x,y,z,0,0,rotZ+180) )
setElementID ( roadblockobject, rbo )
setElementPosition ( source, x, y, z+0.5 )
outputChatBox("Sandbag erstellt!",source,255,255,0)
end
addCommandHandler("sandbag",sandbag)
Alles anzeigen
Wieso können die Fraktionen keine Barricaden erstellen?