function createTheGate ()
myGate = createObject( 988, 96.722534179688, 1920.3703613281, 18.158107757568, 0, 0, 270 )
end
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate )
function openMyGate (player, command )
team = getPlayerTeam(player)
if team then
if (getTeamName() == "Army") then
moveObject( myGate, 5000, 96.722534179688, 1915.8951416016, 18.158107757568 )
outputChatBox(""..getPlayerName(player).." opened the Armybase", 255, 255, 0, true)
end
end
end
addCommandHandler("armyo",openMyGate)
function movingMyGateBack (player, command)
team = getPlayerTeam(player)
if team then
if (getTeamName() == "Army") then
moveObject( myGate, 5000, 96.722534179688, 1920.3703613281, 18.158107757568 )
outputChatBox(""..getPlayerName(player).." closed the Armybase", 255, 255, 0, true)
end
end
end
addCommandHandler("armyc", movingMyGateBack)