Is there a smarter way to do this ?
#2

More optimized version and break when you get the nearest ATM, don't need to continue looping
PHP код:
IsPlayerInRangeOfAnyAtm(playeridFloat:range)
{
    for(new 
iMAX_ATMsji++) 
    {
        if(
IsPlayerInRangeOfPoint(playeridrangeATMInfo[i][xPos], ATMInfo[i][yPos], ATMInfo[i][zPos])) return true;
    }
    return 
false;

Reply


Messages In This Thread
Is there a smarter way to do this ? - by NeXoR - 03.09.2016, 23:16
Re: Is there a smarter way to do this ? - by Shinja - 03.09.2016, 23:30
Re: Is there a smarter way to do this ? - by SickAttack - 03.09.2016, 23:39
Re: Is there a smarter way to do this ? - by NeXoR - 03.09.2016, 23:53
Re: Is there a smarter way to do this ? - by SickAttack - 04.09.2016, 00:04
Re: Is there a smarter way to do this ? - by NeXoR - 04.09.2016, 00:17
Re: Is there a smarter way to do this ? - by SickAttack - 04.09.2016, 00:18
Re: Is there a smarter way to do this ? - by Vince - 04.09.2016, 08:52

Forum Jump:


Users browsing this thread: 1 Guest(s)