Auto-team balance..
#4

A better idea:

pawn Code:
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;
    }
  }
}
Just a small sketch of a situation, unsure if I made some mistakes in my code though.
Reply


Messages In This Thread
Auto-team balance.. - by The_Moddler - 07.10.2010, 19:41
Re: Auto-team balance.. - by willsuckformoney - 07.10.2010, 19:57
Re: Auto-team balance.. - by kyoto - 12.11.2010, 14:46
Re: Auto-team balance.. - by Hiddos - 12.11.2010, 14:56
Re: Auto-team balance.. - by Jeroen52 - 26.03.2011, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)