Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //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
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement