27.01.2011, 23:06
pawn Код:
new TeamPlayers[ <Amount of teams here> ];
public OnPlayerRequestSpawn(playerid)
{
for(new teams; teams < [Team Amount]; teams++)
{
if(teams == GetPlayerTeam(playerid)) continue; //Or gTeam[playerid], or w/e you use.
if(TeamPlayers[Player Team Variable] > TeamPlayers[teams] + 3)
{
SendClientMessage(playerid, COLOR_RED, "You can't join this team as it would unbalance the game!");
return 0;
}
}
}
//By Hiddos