GetOnlinePlayersFromTeam(teamid) { ? ? new count; ? ? foreach(new i : Player) { ? ? ? ? if (GetPlayerTeam(i) == teamid) count; ? ? } ? ? return count; } // new count =?GetOnlinePlayersFromTeam(5);
for(new player = 0, pool = GetPlayerPoolSize(); player <= pool; player) // cycle through all players { if(GetPlayerTeam(player) == YOUR_TEAM) // if the player has the right team { // do whatever you want } }