SA-MP Forums Archive
check if someone near an object - 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: check if someone near an object (/showthread.php?tid=615885)



check if someone near an object - 1fret - 28.08.2016

how do i check if someone is near an object that spawns at a random location , could someone tell me please and please show a little bit of coding as well


Re: check if someone near an object - PrO.GameR - 28.08.2016

If you are using streamer you can use this function to get the pos then check
Streamer_GetFloatData(type, STREAMER_ALL_TAGS id, data, Float:result)
If not, there is not really a way unless you save the pos then check.


Re: check if someone near an object - 1fret - 28.08.2016

Quote:
Originally Posted by PrO.GameR
Посмотреть сообщение
If you are using streamer you can use this function to get the pos then check
Streamer_GetFloatData(type, STREAMER_ALL_TAGS id, data, Float:result)
If not, there is not really a way unless you save the pos then check.
Is there any tutorial that i can use to help me with using that function?


Re: check if someone near an object - Shinja - 28.08.2016

You can this object using an array, and then you can check it easily with IsPlayerInRangeOfPoint