for(new i; i < MAX_PLAYERS; i++){ if(IsPlayerStreamedIn(i, playerid) && IsCop(i) /* replace with your cop variable */) { // Do stuff break; }}