SA-MP Forums Archive
How to see if someone is at a certain location? - 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)
+--- Thread: How to see if someone is at a certain location? (/showthread.php?tid=370640)



How to see if someone is at a certain location? - ValentinLaw - 20.08.2012

PHP код:
        if(IsPlayerInRangeOfPoint(playerid,700,-1952.4735,661.1452,118.8698))
            {
                
//mycode
                
return 1;
            } 
So I have the code and its working when I use it with a command. But I want it, when he actually comes to that place, the code would work.. Any suggetions?


Re: How to see if someone is at a certain location? - Vince - 20.08.2012

Use timers or OnPlayerEnterDynamicArea of Streamer plugin.


Re: How to see if someone is at a certain location? - ValentinLaw - 20.08.2012

I see.. Thank you I'll try.


Re: How to see if someone is at a certain location? - TaLhA XIV - 20.08.2012

lowe thr range.


Re: How to see if someone is at a certain location? - Ranama - 20.08.2012

Quote:
Originally Posted by TaLhA XIV
Посмотреть сообщение
lowe thr range.
How would that help? xD


Re: How to see if someone is at a certain location? - TaLhA XIV - 20.08.2012

That is because he has too much high range and he is asking for a certain spot or place.-_-


Re : How to see if someone is at a certain location? - ricardo178 - 20.08.2012

Set a timer of 1 second to check if player is close to that point, or use OnPlayerUpdate calback.


Re: How to see if someone is at a certain location? - Ranama - 20.08.2012

Quote:
Originally Posted by TaLhA XIV
Посмотреть сообщение
That is because he has too much high range and he is asking for a certain spot or place.-_-
Oh, I know what you're thinking about now, but actually he was wondering on how to make it so the function got called directly when he get into the place so he don't have to type the command for it to work, not that it works in a to big range. But i understand that you understood it as the command worked to long away from the spot