28.01.2011, 13:52
use this tested
At the top add
And then replace this
At the top add
Код:
new TeamPlayers[ <Amount of teams here> ];
pawn Код:
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;
}
}
}