Get a random player in range of position using loops
#1

Hi.

Is there a good way to get a random player in range of a position whitout get stuck in infinite loops?


i tryed

pawn Код:
stock GetRandomPlayerInRange(Float:X,Float:Y,Float:Z,Float:Range)
{
    Start:
    new randPlayer = Iter_Random(Player);
    randPlayer = (IsPlayerInRangeOfPoint(randPlayer,Range,X,Y,Z) ? randPlayer : 255;
    if(randPlayer == 255) goto Start;
    else return randPlayer;
}
but im not sure what you think?
Reply


Messages In This Thread
Get a random player in range of position using loops - by iJumbo - 04.09.2013, 20:34
Re: Good way to - by Vince - 04.09.2013, 22:32
Re: Good way to - by iJumbo - 04.09.2013, 23:00
Re: Good way to - by Kar - 05.09.2013, 02:00
Re: Good way to - by CyNiC - 05.09.2013, 03:48
Re: Get a random player in range of position using loops - by Pottus - 05.09.2013, 04:48
Re: Get a random player in range of position using loops - by iJumbo - 05.09.2013, 10:01
Re: Get a random player in range of position using loops - by CaveDweller - 05.09.2013, 11:24
Re: Get a random player in range of position using loops - by iJumbo - 05.09.2013, 11:30
Re: Get a random player in range of position using loops - by CaveDweller - 05.09.2013, 11:31

Forum Jump:


Users browsing this thread: 1 Guest(s)