Hey, Ich benötige Hilfe, bin Anfänger und wudnere mich wieso mein Script nicht geht
Möchte das die Function nur ausgeführt ist wenn der Spieler Admin ist
Code
function move()
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) )
if state == 0 then --it's closed so open it
moveObject ( gate, time, -2060.1000976563, -6.5, 45.799999237061, 0, 0, 0 ) --Time means how fast the object'ill be moved.
state = state + 1
elseif state == 1 then --it's open so close it
moveObject ( gate, time, -2060.1000976563, -6.5, 52.400001525879, 0, 0, 0 )
state = state - 1
end
end
end
addCommandHandler("admlift", move )--this one creates a command "/gate" wich'll start the move function
addEventHandler("onResourceStart", root, move)
Alles anzeigen