for new(i; i < MAX_PLAYERS; i++){ if(gTeam[i] == ...) { // disable SAM here } else { // enable SAM here }}