04.09.2013, 23:00
I know that goto is not very well handled by the compiler
You mean something like that ?
Never ever used do-while loops
You mean something like that ?
pawn Код:
stock GetRandomPlayerInRange(Float:X,Float:Y,Float:Z,Float:Range)
{
new randPlayer;
do {
randPlayer = Iter_Random(Player);
randPlayer = (IsPlayerInRangeOfPoint(randPlayer,Range,X,Y,Z) ? randPlayer : 255;
}
while (randPlayer == 255);
return randPlayer;
}