gate = createObject(980, x, y, z, rx, ry, rz)-- 980 is the object number, x the x-coordinate, y-coordinate, z-coordinate, rx,ry,rz are the rotations.
function gateOpen()
moveObject( gate, 2000, x, y, z )-- gate is the object which we want to move, 2000 is the time the gate needs to move to the new coordinates. x,y,z are the coordinates where the gate should move .
end
addCommandHandler("gateo", gateOpen)--Command /gateo to open the gate
function gateClose()
moveObject( gate, 2000, x, y, z )--again the same thing just type here the x,y,z from above. so the gate gets where it was at the beginning.
end
addCommandHandler("gatec", gateClose)--Command /gatec to close the gate