TeamBalancer Help
#1

Well for a few days now, ive been failing with the team balancer. it doesnt work well. USA team is always full, when its not.. and players are allowed to join teams with 10 players while others have 2 and 3 players

help!

Код:
new count[4];
for(new p = 0; p < GetMaxPlayers(); p++)
{
	if (gTeam[p] == TEAM_USA) count[0]++;
	else if (gTeam[p] == TEAM_CHINA) count[1]++;
	else if (gTeam[p] == TEAM_IRAN) count[2]++;
  else if (gTeam[p] == TEAM_RUSSIA) count[3]++;
}
switch(gTeam[playerid])
{
case TEAM_USA: if(count[0] > count[1] && count[0] > count[2] && count[0] > count[3]) return SendClientMessage(playerid, COLOR_RED, ">>>>>>>This team is full!"), 0;
case TEAM_CHINA: if(count[1] > count[0] && count[1] > count[2] && count[1] > count[3]) return SendClientMessage(playerid, COLOR_RED, ">>>>>This team is full!"), 0;
case TEAM_IRAN: if(count[2] > count[0] && count[2] > count[1] && count[2] > count[3]) return SendClientMessage(playerid, COLOR_RED, ">>>>This team is full!"), 0;
case TEAM_RUSSIA: if(count[3] > count[0] && count[3] > count[1] && count[3] > count[2]) return SendClientMessage(playerid, COLOR_RED, ">>>>This team is full!"), 0;

}
Reply


Messages In This Thread
TeamBalancer Help - by Saurik - 12.05.2010, 22:57
Re: TeamBalancer Help - by Saurik - 12.05.2010, 23:24

Forum Jump:


Users browsing this thread: 2 Guest(s)