03.04.2013, 02:09
pawn Код:
stock GetTeamCount(teamid)
{
new playercount = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerState(i) == PLAYER_STATE_NONE) continue;
if(gTeam[i] != teamid) continue;
playercount++;
}
return playercount;
}
like
pawn Код:
new teamcount1 = GetTeamCount(TEAM_1);
format(string,400, "Team1: %d",teamcount1);