//BigSmoke_bb //Se puede optimizar con GetPlayerPoolSize stock RandomIDOfPlayer() { new z = 0, w, y = GetMaxPlayers(); static Conectados[MAX_PLAYERS]; while(z < y) { if(IsPlayerConnected(z) && Condiciones[z] == 0) // { Conectados[w] = z; w++; } z++; } return !w ? -1 : Conectados[random(w)]; //Id aleatoria }