22.07.2012, 06:44
(
Последний раз редактировалось maramizo; 30.07.2012 в 04:50.
)
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;
}