If team is full --> Switch team
#2

Try this

Код:
public OnPlayerRequestSpawn(playerid)
{
	new count1,count2;
	for(new i = 0; i < GetMaxPlayers(); i++)
  {
    if(pi[playerid][army] == 1) count1 ++; // Change "pi[playerid][army] == 1) " to like if(gTeam == TEAM)
    else if (pi[playerid][Terr] == 1) count2 ++; // Same for here, just the other team
  }
  	if(count1 > count2)
  {
		GameTextForPlayer(playerid,"~r~This team is full! Please select another.",3000,3);
		ForceClassSelection(playerid);
	}
	else if(count2 > count1)
	{
	  GameTextForPlayer(playerid,"~r~This team is full! Please select another.",3000,3);
		ForceClassSelection(playerid);
	}
 	return 1;
}
It's untested, but i belive it works

-Naxix
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: 2 Guest(s)