Picking 1 person
#4

Do you want the infected player to be random?

pawn Код:
stock GetRandomPlayer() // No idea who wrote it..
{
  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];
}
Reply


Messages In This Thread
Picking 1 person - by Kitten - 14.11.2010, 22:29
Re: Picking 1 person - by willsuckformoney - 14.11.2010, 23:24
Re: Picking 1 person - by Kitten - 14.11.2010, 23:26
Re: Picking 1 person - by Cameltoe - 14.11.2010, 23:29
Re: Picking 1 person - by Kitten - 14.11.2010, 23:32
Re: Picking 1 person - by The_Moddler - 14.11.2010, 23:33
Re: Picking 1 person - by Kitten - 14.11.2010, 23:39
Re: Picking 1 person - by The_Moddler - 14.11.2010, 23:40
Re: Picking 1 person - by Kitten - 14.11.2010, 23:41
Re: Picking 1 person - by Kitten - 14.11.2010, 23:47

Forum Jump:


Users browsing this thread: 1 Guest(s)