gate124 = createObject ( 980, 1039, 2081, 11, 0, 0, 270 )
TorSFPDStatus = 1
function Gate (source)
local playerx
local playery
playerx, playery = getElementPosition (source)
if (getDistanceBetweenPoints2D(1039, 2081, playerx, playery) < 10) then
if TorSFPDStatus == 1 then
moveObject (gate124, 3500, 1039, 2081, 6, 0, 0, 0 )
TorSFPDStatus = 0
else
moveObject (gate124, 3500, 1039, 2081, 11, 0, 0, 0 )
TorSFPDStatus = 1
end
end
end
addCommandHandler ("tk", Gate)
bindKey("j", "down", Gate )
Wie Geht das mit dem bind