random spectate?
#3

Код:
stock GetRandomPlayer()
{
  new yplayer[MAX_PLAYERS+1];
  for (new y = 0; y != MAX_PLAYERS; y ++) {
    if (IsPlayerConnected(y)) {
      yplayer[0] ++;
      yplayer[yplayer[0]] = y;
    }
  }
  return yplayer[random(yplayer[0])+1];
}
I take no credit for this, but it is a function that I have stored.
Reply


Messages In This Thread
random spectate? - by hipy - 22.07.2009, 20:24
Re: random spectate? - by hipy - 22.07.2009, 20:50
Re: random spectate? - by Limex - 22.07.2009, 20:55
Re: random spectate? - by James_Alex - 22.07.2009, 20:55
Re: random spectate? - by hipy - 22.07.2009, 21:07

Forum Jump:


Users browsing this thread: 1 Guest(s)