04.09.2013, 20:34
Hi.
Is there a good way to get a random player in range of a position whitout get stuck in infinite loops?
i tryed
but im not sure what you think?
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;
}