Little team Balancer help!
#1

Well i have a code here. It works, but i have 4 teams and i do not know how to set the Count1. Count2 Count3 Count4 to make it work for 4 teams


EX. Count1 > Count2 Count2 > Count1

idk how to make it for make for 4 teams.. help

Код:
new count1, count2, count3, count4;
for(new p = 0; p < GetMaxPlayers(); p++)
{
  if (gTeam[p] == TEAM_USA)
  {
    count1++;
  }
  else if (gTeam[p] == TEAM_CHINA)
  {
    count2++;
  }
  else if (gTeam[p] == TEAM_IRAN)
  {
    count3++;
  }
else if (gTeam[p] == TEAM_RUSSIA)
  {
    count4++;
  }
}
if ((count1 > count2) && gTeam[playerid] == TEAM_USA)
  return SendClientMessage(playerid, COLOR_RED, " This team is full!");
else if ((count2 > count1) && gTeam[playerid] == TEAM_CHINA)
  return SendClientMessage(playerid, COLOR_RED, " This team is full!");
else if ((count2 > count1) && gTeam[playerid] == TEAM_IRAN)
  return SendClientMessage(playerid, COLOR_RED, " This team is full!");
Reply


Messages In This Thread
Little team Balancer help! - by Saurik - 12.05.2010, 00:53
Re: Little team Balancer help! - by cessil - 12.05.2010, 01:53
Re: Little team Balancer help! - by mini_mi - 30.08.2012, 15:51
Re: Little team Balancer help! - by Dan. - 30.08.2012, 16:05

Forum Jump:


Users browsing this thread: 6 Guest(s)