If team is full --> Switch team
#15

Quote:
Originally Posted by Naxix
Try this then..

Код:
  new Count1, Count2;
  for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(PlayerTeam[playerid] == ZombieTeam) Count1++;
    else if (PlayerTeam[playerid] == HumanTeam) Count2++;
  }
  if ((Count1 > Count2) && PlayerTeam[playerid] == HumanTeam)
  {
    SendClientMessage(playerid,COLOUR_RED, "Balancing teams. Choose Another Team");
    return 0;
  }
  else if ((Count2 > Count1) && PlayerTeam[playerid] == ZombieTeam)
  {
    SendClientMessage(playerid,COLOUR_RED, "[BALANCER] Balancing teams. Choose Another Team");
    return 0;
  }
  return 1;
	}
This doesn't work for not spawning, right? :P
Reply


Messages In This Thread
If team is full --> Switch team - by rbN. - 05.05.2010, 17:38
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 17:58
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 18:10
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 18:11
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 18:15
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 18:16
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 18:17
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 18:18
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 18:19
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 18:23
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 18:25
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 18:29
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 18:40
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 18:43
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 18:48
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 18:49
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 19:06
Re: If team is full --> Switch team - by Naxix - 05.05.2010, 19:20
Re: If team is full --> Switch team - by rbN. - 05.05.2010, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)