gate = createObject(id,x,y,z, rotx, roty, rotz)
open = false
function checkOpen(source)
if ( open == true ) then
open = false
gateClose(source)
else
open = true
gateOpen(source)
end
end
function gateOpen(source)
moveObject( gate, 2000, x, y, z )
end
function gateClose(source)
moveObject( gate, 2000, x, y, z )
end
addCommandHandler(\"command\", checkOpen)