Get points. - 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: Get points. (
/showthread.php?tid=481323)
Get points. -
audriuxxx - 15.12.2013
Hi,
How to get points, a coordinates of a sphere? look in picture:
Re: Get points. -
newbie scripter - 15.12.2013
attach object to player any of there spheres
18843 GlassSphere1
18844 WaterUVAnimSphere1
18845 RTexturesphere
EDIT:
an copy from iJumbo's random point selector in the permieter. \/
Click here and see the post
Re: Get points. -
cessil - 15.12.2013
if you're looking at it top down then it's
object x = player x + (cos(angle) * distance)
object y = player y + (sin(angle) * distance)
angle should also be in radians which is degrees * (Math.PI / 180) or when you use floatcos or floatsin you can specify what type of measurement you're using
so if you want it to be at an angle of 55 degrees and a distance of 10 units it'd be
object x = player x + (Floatcos(55,degrees) * 10)
object y = player y + (Floatsin(55,degrees) * 10)