08.03.2015, 12:11
creating to choose a random number...
example: / job
choose random an id on the server to go hitman to kill him
??
example: / job
choose random an id on the server to go hitman to kill him
??
stock GetRandomOnlineID() { new tmp[MAX_PLAYERS],idx; for(new i; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) tmp[idx]=i,idx++; return tmp[random(idx)]; } new id = GetRandomOnlineID(); //now you have a random id