team balance
#2

Код:
public OnPlayerRequestSpawn(playerid)
{

    new Count1, Count2;
    for(new p = 0; p < GetMaxPlayers(); p++)
    {
        if (GetPlayerTeam(p) == TEAM_POLICE) Count1++;
        else if (GetPlayerTeam(p) == TEAM_TERRORISTS) Count2++;
    }
    if ((Count1 > Count2) && GetPlayerTeam(playerid) == TEAM_TERRORISTS)
    {
        GameTextForPlayer(playerid, "~r~This team is full!", 600, 5);
        PlayerPlaySound(playerid,1055,0, 0, 0);
        return 0;
    }
    else if ((Count2 < Count1) && GetPlayerTeam(playerid) == TEAM_POLICE)
    {
        GameTextForPlayer(playerid, "~r~This team is full!", 600, 5);
        PlayerPlaySound(playerid,1055,0, 0, 0);
        return 0;
    }
}
Test that..?
Reply


Messages In This Thread
team balance - by BlackWolf120 - 23.02.2011, 17:09
Re: team balance - by Hashski - 23.02.2011, 18:09
Re: team balance - by Serbish - 23.02.2011, 18:27
Re: team balance - by BlackWolf120 - 23.02.2011, 20:30
Re: team balance - by BlackWolf120 - 08.03.2011, 01:30
Re: team balance - by Roperr - 07.10.2011, 23:30

Forum Jump:


Users browsing this thread: 1 Guest(s)