21.01.2015, 15:34
Hello , recently i was watching tutorials and i saw someone who posted on how to CountTeamPlayers and here is its code.
I want to make a code that when player type /team he gets his team members in dialog . how to do it?
PHP код:
stock CountTeamPlayers(team)
{
new count;
for(new i; i < MAX_PLAYERS; i++)
{
if( IsPlayerConnected(i)//if player is connected
&& GetPlayerTeam(i) == team)//if team id matches
{
count++;//add one to the count
}
}
return count;
}