Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Pegar jogador de forma random.
- RandomPlayer()
- {
- new Arr[MAX_PLAYERS] = {-1, ...}, x = 0;
- for(new i; i != MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected( i )) Arr[x] = i, ++x;
- }
- return !x ? -1 : Arr[random( x )] ;
- }
- // Não trava servidor
- // Está bem otimizado
- // Criado por Bruno da Silva
- // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement