local myGate2 = createObject (2957, 386.48864746094,-1526.0137939453,32.323436737061 , 0, 0, 45) --gate 2
function openMyGate()
moveObject ( myGate2, 3000, 386.48864746094,-1526.0137939453,35.323436737061 )
end
addCommandHandler("*1abrir",openMyGate)
function movingMyGateBack()
moveObject ( myGate2, 3000, 386.48864746094,-1526.0137939453,32.323436737061)
end
addCommandHandler("*1cerrar",movingMyGateBack)
setTimer(function()
local time = getRealTime()
if time.hour >= 1 and time.hour < 3 then
movingMyGateBack()
else
openMyGate()
end
end, 10000, 0)