Hallo Scripting Base...
Ich bin gerade dabei scripten zu lernen und habe ein kleines Problem -.-'
Und zwar möchte ich ein Fahrstuhl scripten der automatisch nach 15 Sekunden wieder runter geht und nur bestimmte Leute damit fahren können. Aber es funktioniert weder der Timer noch das nur bestimmte Leute fahren können.
Bitte helft mir...
Hier das Script:
Lift = createObject ( 3115, -2220, 420, 35, 0, 0, 0 )
function test ( player )
if getDistanceBetweenPoints3D ( -2220, 420, 35, getElementPosition ( player ) ) <17 then
if getPlayerName ( player ) == "[NR]xXBaaHMXx" or "[NR]Eistee2016" or "[NR]Andinator" then
moveObject ( Lift, 7000, -2220, 420, 58.6 )
setTimer ( 15000, 1 )
outputChatBox ( "xXBaaHMXx is der beste (geht in 5 Sekunden wieder runter)", player )
end
end
end
addCommandHandler ( "baum", test )
function test ( )
moveObject ( Lift, 7000, -2220, 420, 58.6 )
end