Thanks,
can check if my code is complete?
function createTheGate ()
myGate1 = createObject ( 971, 301.79998779297, -1566.9000244141, 29.5, 0, 1, 289.75 )
myGate2 = createObject ( 971, 356.5, -1464.5999755859, 28.89999961853, 0, 359.5, 74 )
end
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate )
function teleport ( player )
if string.find( getPlayerName( player ) , "[OuT]", 1, true ) then
setElementPosition ( player, 307, -1520, 25 )
end
end
addCommandHandler("baseout",teleport)
function openMyGate ( player )
if string.find( getPlayerName( player ) , "[OuT]", 1, true ) then
moveObject ( myGate1, 2500, 301.79998779297, -1566.9000244141, 24.5)
moveObject ( myGate2, 2500, 356.5, -1464.5999755859, 24.5)
setTimer(movingMyGateBack,5000,1,player)
end
end
addCommandHandler("open",openMyGate)
function movingMyGateBack ( player )
if string.find( getPlayerName( player ) , "[OuT]", 1, true ) then
moveObject ( myGate1, 2500, 482.89999389648, 2884.8000488281, 14.10000038147 )
end
end
addCommandHandler("close",movingMyGateBack)