PHP Code:
new iPlayers[32], iNum, iTotalPing, iPing, iLoss
// get the players num and save their id into iPlayers array
get_players(iPlayers, iNum)
for(new i; i<iNum; i++)
{
// for each array cell that contain the id of a connected player, retrieve the player ping
get_user_ping(iPlayers[i], iPing, iLoss)
// add this ping ti the variable iTotalPing
iTotalPing += iPing
}
__________________