Ich habe mir mit der Hilfe von YouTube und Mta wiki ein Aufzugsscript gebastelt da kommt nun aber immer ein Fehler in der Konsole das angeblich eine Nil value fehlt nun weis ich aber nicht wie ich dieses ändern soll
Script:
hausLift = createObject ( 3114, 2091.2998046875, 2362.8994140625, 21.94, 0, 0, 179.99450683594)
Status = 0
function autoLift_func( player )
local pname = getPlayerName ( player )
if (pname == "Troll") then
if Status == 0 then
moveObject( hausLift, 2091.2998046875, 2362.8994140625, 9.8299999237061 )
Status = 1
outputChatBox("Lift wird nach unten gefahren", player, 0, 255, 0 )
local sound = playsound ("sounds/lift.mp3")
setSoundVolume (sound, 1)
else
moveObject( hausLIft, 2091.2998046875, 2362.8994140625, 21.94 )
Status = 0
outputChatBox("Lift wird nach oben gefahren. Bitte bleiben sie an ihrer jetzigen Position stehen", player, 0, 255, 0 )
local sound = playsound ("sounds/lift.mp3")
setSoundVolume (sound, 1)
end
end
end
addComandHandler( "Lift", autoLift_func )