gate124 = createObject ( 8838, 249, -1176, 73, 0, 0, 35)
TorSFPDStatus = 1
function Gate (source)
local playerx
local playery
playerx, playery = getElementPosition (source)
if (getDistanceBetweenPoints2D(249, -1176, playerx, playery) < 10) then
if TorSFPDStatus == 1 then
moveObject (gate124, 3500, 249, -1176, 82, 0, 0, 0 )
TorSFPDStatus = 0
else
moveObject (gate124, 3500, 249, -1176, 73, 0, 0, 0 )
TorSFPDStatus = 1
end
end
end
addCommandHandler ("jh", Gate)
function Keybind(player)
bindKey ( player, "2", "down", Gate )
end
addEventHandler("onPlayerJoin", getRootElement(), Keybind)
function unKeybind(player)
unbindKey ( player, "2", "down", Gate )
end
addEventHandler("onPlayerJoin", getRootElement(), unKeybind)
Das geht einfach nicht