Auto Detector [HELP NEEDED] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Auto Detector [HELP NEEDED] (
/showthread.php?tid=205750)
Auto Detector [HELP NEEDED] -
Jordan Smith - 02.01.2011
How to make a script. For example when a player can near to the object and NPC it gives a message to player. Please help me in both part. Object and NPC
Re: Auto Detector [HELP NEEDED] -
Jordan Smith - 02.01.2011
have I asked a tough question
Re: Auto Detector [HELP NEEDED] -
Rachael - 02.01.2011
I suggest you use Incognito's streamer, and create dynamic areas, then use OnPlayerEnterDynamicArea.
If not, you will have to loop through max players checking IsPlayerInRangeOfPoint, which is very resource intensive.
Re: Auto Detector [HELP NEEDED] -
Jordan Smith - 02.01.2011
do you have any other quick method
Re: Auto Detector [HELP NEEDED] -
Rachael - 02.01.2011
There is no quick method, the best method is the streamed area idea
Re: Auto Detector [HELP NEEDED] -
Jordan Smith - 02.01.2011
well that would lag too much
Re: Auto Detector [HELP NEEDED] -
Amit_B - 02.01.2011
You can create the object and use a timer to detect if the player is near it, using IsPlayerInRangeOfPoint.
Re: Auto Detector [HELP NEEDED] -
Calgon - 02.01.2011
Quote:
Originally Posted by Jordan Smith
well that would lag too much
|
No, it wouldn't. It's a more efficient method than the alternative Rachael suggested.
Re: Auto Detector [HELP NEEDED] -
DevilG - 02.01.2011
Quote:
Originally Posted by Amit_B
You can create the object and use a timer to detect if the player is near it, using IsPlayerInRangeOfPoint.
|
I believe this would work well.