30.05.2010, 18:02
pawn Code:
new Players;
pawn Code:
//OnPlayerConnect
Players++;
pawn Code:
//OnPlayerDisconnect
Players--;
pawn Code:
//OnPlayerRequestSpawn
new tmembers = -1;
#define NUM_TEAMS (11)
for(new i; i != MAX_PLAYERS; i++) if(gTeam[playerid] == gTeam[i]) tmembers++;
if(tmembers >= floatround((Players / NUM_TEAMS), floatround_ceil))
return !SendClientMessage(playerid 0xFFFFFFAA, "Please choose another team!");
The maximum size is Players divided through team count