19.06.2012, 00:02
pawn Код:
new TeamPlayers[ <Amount of teams here> ];
public OnPlayerRequestSpawn( playerid )
{
for( new teams; teams < 23; teams++ )
{
if( teams == gTeam[ playerid ] ) continue;
if( TeamPlayers[ gTeam[ playerid ] ] > TeamPlayers[ teams ] + 3)
{
SendClientMessage( playerid, COLOR_RED, "You can't join this team as it would unbalance the game!" );
return 0;
}
}
return 1;
}