Team Players
#5

Using foreach inc.
pawn Код:
stock GetTeamPlayers()
{
    new blueteam, redteam;
    foreach(Player, i)
    {
        if(GetPlayerTeam(i) == 1)
        {
            blueteam++
        }
        if(GetPlayerTeam(i) == 2)
        {
            redteam++
        }
    }
    new str[128];
    format(str, 128, "Red team has %i players, while blue team has %i players.", redteam, blueteam);
    return str;
}
Reply


Messages In This Thread
Team Players - by (_AcE_) - 22.07.2012, 02:51
Re: Team Players - by [KHK]Khalid - 22.07.2012, 02:58
Re: Team Players - by (_AcE_) - 22.07.2012, 06:22
Re: Team Players - by [KHK]Khalid - 22.07.2012, 06:30
Re: Team Players - by maramizo - 22.07.2012, 06:44

Forum Jump:


Users browsing this thread: 1 Guest(s)