new teamCount[2], teamid; foreach(Player, ii) { teamid = random(2); SetPlayerTeam(ii, teamid); teamCount[teamid] ++; }