new maxplayers = get_maxplayers()for (new i = 1; i<= maxplayers; i++) { //Here your stuff //i var, represents the player id}