Why this code won't work?
#1

Hello, why this code won't work? just the first line works the others not.

Код:
if(playerOnline >= 2 && GetTeamPlayersAlive(TEAM_RED) == 0) TeamRedSwitch();
else if(playerOnline >= 4 && GetTeamPlayersAlive(TEAM_RED) == 1) TeamRedSwitch();
else if(playerOnline >= 6 && GetTeamPlayersAlive(TEAM_RED) == 2) TeamRedSwitch();
else if(playerOnline >= 8 && GetTeamPlayersAlive(TEAM_RED) == 3) TeamRedSwitch();
Stock TeamRedSwitch:

Код:
stock TeamRedSwitch()
{
    new count = 0;
    new Random = Iter_Random(Player);
    foreach(Player, i)
    {
        if(team[i] == TEAM_BLUE) count++;
        if(count == Iter_Count(Player))
        {
			SetPlayerTeam(playerid,TEAM_RED);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)