Warum funktioniert der SetTimer nicht?
Lua
function barricade(player,command)
if isCop(player) or isFBI(player) or isArmy(player) or isswat(player) then
local x,y,z = getElementPosition(player)
local rotX,rotY,rotZ = getElementRotation(player)
table.insert(allesperren, createObject(1422,x,y,z-0.15,0,0,rotZ) )
setElementPosition ( player, x, y, z+0.5 )
outputChatBox("Barricade erstellt!",player,255,255,0)
setTimer ( 5000, barricade, barricade )
triggerClientEvent ( player, "infobox_start", getRootElement(), "Du kannst nur alle/n5 Sekunden, eine Barricade erstellen!", 7500, 125, 0, 0 )
end
end
addCommandHandler("barricade",barricade)
Alles anzeigen