SA-MP Forums Archive
Sin and cos - 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: Sin and cos (/showthread.php?tid=581227)



Sin and cos - Reek - 11.07.2015

Hi guys. I have a big problem, I try create clock speedometer, I have seen filterscritps but I don't understant this:
(this calculate new x, y for textdraw, dependent of speed). I know, I can use done scripts, but I want create my own.

PHP код:
NewX StartPosX + (dist floatsin(alphadegrees));
NewY StartPosY + (dist floatcos(alphadegrees)); 
I have no idea how this works. When I can use floatsin and floatcos? How can I use this? Please explain me how this works.

Ps. sorry for broken english, this is not my native language.


Re : Sin and cos - KillerDVX - 12.07.2015

These functions are useful for creating a circle. if you want a circle of cars at dry lake.

Floatcos : https://sampwiki.blast.hk/wiki/Floatcos

Floatsin : https://sampwiki.blast.hk/wiki/Floatsin

KillerDVX,



Re: Sin and cos - Reek - 12.07.2015

Lol, this is really easy. Thanks.. but i know what is wiki