Is there a smarter way to do this ?
#4

Quote:
Originally Posted by Shinja
Посмотреть сообщение
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;

Thank you, I'll use this.

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
I'd suggest you use the areas system that comes with the streamer plugin. It makes things like this so much easier and efficient.
I'm not sure if it worths using a plugin for a simple filterscript, but thanks for the offer.
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)