12.02.2011, 16:02
pawn Код:
new TeamPlayers[ <Amount of teams here> ];
public OnPlayerRequestSpawn(playerid)
{
for(new teams; teams < [Team Amount]; 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;
}
}
}
//By Hiddos
pawn Код:
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;
}