Here basic loop all player indexs
PHP Code:
for(int i = 1; i <= MaxClients; i++)
{
if(!IsClientInGame(i)) continue; // skip indexs where no client and not connected fully in game
if(GetClientTeam(i) != 2 || !IsPlayerAlive(i)) continue; // skip client in any other team than team index 2 and when client is dead
// Do your stuff
//
// PrintToChatAll("Player(%i) name %N", i, i);
}
__________________