Code:
CountPlayers()
{
players = level.players;
allies = 0;
axis = 0;
for(i = 0; i < players.size; i++)
{
if ( players[i] == self )
continue;
if((isdefined(players[i].pers["team"])) && (players[i].pers["team"] == "allies"))
allies++;
else if((isdefined(players[i].pers["team"])) && (players[i].pers["team"] == "axis"))
axis++;
}
players["allies"] = allies;
players["axis"] = axis;
return players;
}
When using this and printing what it does to the screen
(playing with bots on 6v6)
Teams are always 5-6 or 6-5 (they switched all the time but never 6-6)
any one knows how to fix that?