Embedded loops and chunk IsPlayerInRangeOfPoint checking, better way?
#1

so far I have a for loop ( connected players ) checking while less than 100, 100 positions of IsPlayerInRangeOfPoint, there was a math plugin for raw math calculations, but there must be a better way to do this loop.
Reply
#2

It's really poor way to do it, your better off using Dynamic areas which can often avoid having to use IsPlayerInRangeOfPoint() all together as well as timers.
Reply
#3

you need a loop better than for loop?
foreach by ******
Reply
#4

That's why I as asking Pottus, think I could use 100 dynamic areas? What are dynamic areas.. all I know is I'd rather not have to check 100 rangeofpoints for only.. 4 meter radius'
Reply
#5

Quote:
Originally Posted by Abhishek.
Посмотреть сообщение
you need a loop better than for loop?
foreach by ******
Read what I said, IsPlayerInRangeOfPoint() is almost always a bad approach.

Dynamic areas are part of Incognito's streamer plugin

https://sampforum.blast.hk/showthread.php?tid=102865

I made this to organize your areas or checkpoints into macro functions. You won't need this but it can save you a lot of code/organizing in the long run.

https://sampforum.blast.hk/showthread.php?tid=423622
Reply
#6

well pottus i dont get what you want to say to him
as if i think you just say him that he should'nt check wheather a player is near a point but insted that he is in an dyanamic area what a whole 3D area for just a point like a cp or pickup
or maybe i am wrong
i am sorry then
Reply
#7

Thanks Pottus
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)