SA-MP Forums Archive
IsPlayerInRangeOfPoint possible to convert in Java? - 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: Discussion (https://sampforum.blast.hk/forumdisplay.php?fid=84)
+---- Thread: IsPlayerInRangeOfPoint possible to convert in Java? (/showthread.php?tid=617604)



IsPlayerInRangeOfPoint possible to convert in Java? - Gorgeousmaniac - 23.09.2016

Is it possible to convert IsPlayerInRangeOfPoint from pawn to java? I know this sounds complex but, spending a couple of hours trying to figure out a /me command java with a designated range alone is so complicated.


Re: IsPlayerInRangeOfPoint possible to convert in Java? - Spmn - 23.09.2016

1) get player position
2) calculate distance from player to point
3) check if (distance <= radius)


Re: IsPlayerInRangeOfPoint possible to convert in Java? - Gorgeousmaniac - 24.09.2016

Quote:
Originally Posted by Spmn
View Post
1) get player position
2) calculate distance from player to point
3) check if (distance <= radius)
Thanks man!