Hallo Leute,
ich habe mir vor kurzem ein kleines Gate Script erstellt mit Hilfe von ein paar Leuten.
Es klappt auch alles jedoch können es auch normale User öffnen obwohl ich "adminlvl 4" eingetragen habe.
Siehe hier:
Lua
gate1 = createObject(980,-2907.2998046875,14.19921875,5.6999998092651,0,0,277.998046875)
function moveGate(source)
if vioGetElementData(source,"adminlvl") >= 4 then
local x,y,z = -2907.2998046875,14.19921875,5.6999998092651
local px,py,pz = getElementPosition(source)
if getDistanceBetweenPoints3D ( x,y,z, px, py, pz ) < 10 then
moveObject ( gate1, 2000, -2036.7998046875,135.599609375,-10.6999998092651 )
outputChatBox("Das Tor schliest sich in 10 Sekunden Wieder", source )
setTimer( gate_timer, 10000, 1 )
end
else
outputChatBox( "Du bist nicht befugt!", source, 125, 0, 0 )
end
end
addCommandHandler("gate",moveGate)
function gate_timer()
moveObject(gate1, 2000,-2907.2998046875,14.19921875,5.6999998092651)
end
Alles anzeigen
Mfg