team balance issue
#9

pawn Код:
//OnPlayerRequestSpawn

CountPolice = 0; // Remove this
CountTerrorists = 0; // Remove this

    foreach (Player, i)
    {
        if(gTeam[i] == TEAM_POLICE)
        {
            CountPolice++;
        }
        if(gTeam[i] == TEAM_TERRORISTS)
        {
            CountTerrorists++;
        }
    }


        if(gTeam[playerid] == TEAM_POLICE && CountPolice > CountTerrorists)
        {
            SendClientMessage(playerid, 0xE100E1FF, "Join the other team!");
            GameTextForPlayer(playerid, "full!", 2000, 5);
            ForceClassSelection(playerid);
            return 0;
        }
        if(gTeam[playerid] == TEAM_TERRORISTS && CountPolice < CountTerrorists)
        {
            SendClientMessage(playerid, 0xE100E1FF, "Join the other team!");
            GameTextForPlayer(playerid, "full!", 2000, 5);
            ForceClassSelection(playerid);
            return 0;
        }
        if(gTeam[playerid] == TEAM_POLICE && CountPolice == CountTerrorists)
        {
            SendClientMessage(playerid, 0xE100E1FF, "Welcome to the 'Police' team!");
            GameTextForPlayer(playerid, "~b~Police", 2000, 5);
            return 0;
        }
        if(gTeam[playerid] == TEAM_TERRORISTS && CountPolice == CountTerrorists)
        {
            SendClientMessage(playerid, 0xE100E1FF, "Welcome to the 'Terrorists' team!");
            GameTextForPlayer(playerid, "~r~Terrorists", 2000, 5);
            return 0;
        }
Reply


Messages In This Thread
team balance issue - by PawnoQ - 18.12.2011, 13:52
Re: team balance issue - by §с†¶e®РµРe - 18.12.2011, 15:07
Re: team balance issue - by PawnoQ - 18.12.2011, 15:15
Re: team balance issue - by Gamer_Z - 18.12.2011, 15:18
Re: team balance issue - by §с†¶e®РµРe - 18.12.2011, 15:20
Re: team balance issue - by PawnoQ - 18.12.2011, 15:36
Re: team balance issue - by Thresholdold - 18.12.2011, 15:43
Re: team balance issue - by PawnoQ - 18.12.2011, 15:47
Re: team balance issue - by Thresholdold - 18.12.2011, 15:52
Re: team balance issue - by suhrab_mujeeb - 18.12.2011, 17:23

Forum Jump:


Users browsing this thread: 1 Guest(s)