-- Try this
gate1 = createObject(971, -2182.5, 1009.3994140625, 82.599998474121, 0, 0, 0)
gate2 = createObject(971, -2191.2998046875, 1009.3994140625, 82.599998474121, 0, 0, 0)
megusta = false
addCommandHandler ( "gate",
function ( source )
if ( getPlayerTeam ( source ) == getTeamFromName ( "West Coast Cribs" ) ) then
if ( megusta ~= true ) then
moveObject ( gate1, 2500, -2182.5, 1009.3994140625, 82.599998474121 )
moveObject ( gate2, 2500, -2191.2998046875, 1009.3994140625, 82.599998474121 )
megusta = true
else
moveObject ( gate1, 2500, -2176.5, 1009.3994140625, 82.599998474121 )
moveObject ( gate2, 2500, -2198.2998046875, 1009.3994140625, 82.599998474121 )
megusta = false
end
else
outputChatBox( "you're not a member of the West Coast Cribs!", source, 0, 255, 0, true )
end
end
)