22.12.2013, 16:17
lets say we have 2 vars representing the teams:
vars: Team1 and Team2
now when someone joins, for example, Team 1. we add 1 to the Team1 var.
we do the same for Team2 ofc.
so now we have two vars representing the "size" of each Team.
Now we add something to that part when a player joins one of the Teams.
if variable Team1 is greater than variable Team2 then we force the player to join Team2
simple.
Also -1 when someone leaves the Team or disconnects
vars: Team1 and Team2
now when someone joins, for example, Team 1. we add 1 to the Team1 var.
we do the same for Team2 ofc.
so now we have two vars representing the "size" of each Team.
Now we add something to that part when a player joins one of the Teams.
if variable Team1 is greater than variable Team2 then we force the player to join Team2
simple.
Also -1 when someone leaves the Team or disconnects