new randomPlayer;randomPlayer = random(MAX_PLAYERS);if(IsPlayerConnected(randomPlayer)){ // connected.}else{ // not connected.}