SA-MP Forums Archive
Coords. and real distance - 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: Coords. and real distance (/showthread.php?tid=580807)



Coords. and real distance - amirab - 08.07.2015

Hey,
i want to know each coord like each +x or +y is how many meters ?

or is there any function to get player speec via calculating player's old and new pos ?

thanks


Re: Coords. and real distance - Roko_foko - 08.07.2015

try to ****** that. It's easier for you and for us. And when/if you start working as programmer you will have to learn to search things like this. It's a common question and somebody already asked it, for sure.

http://forum.sa-mp.com/showpost.php?...63&postcount=3
http://forum.sa-mp.com/showpost.php?...29&postcount=4

hope it helps


Re: Coords. and real distance - amirab - 09.07.2015

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
try to ****** that. It's easier for you and for us. And when/if you start working as programmer you will have to learn to search things like this. It's a common question and somebody already asked it, for sure.

http://forum.sa-mp.com/showpost.php?...63&postcount=3
http://forum.sa-mp.com/showpost.php?...29&postcount=4

hope it helps
i'm not Newbie bro , and thanks for your first link
but it seems you didn't get my sentence i said i need a Speed counter which is using getting positions not Velocity


Re: Coords. and real distance - Roko_foko - 09.07.2015

Speed by definition is distance/time. Somwhow you need to calculate time as well. You do that with timers. one of the link shows how you do that. Probably i didnt understood what you watned


Re: Coords. and real distance - amirab - 09.07.2015

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
Speed by definition is distance/time. Somwhow you need to calculate time as well. You do that with timers. one of the link shows how you do that. Probably i didnt understood what you watned
umm actually not exactly but never mind i solved it with GetDistanceToPoint(playerid, x , y , z);
and divide by time so as you said each unit is 1 meter so each distance is 1 meter and with a 1 sec timer
i can divide it and output would be Meter Per Seconds and now done with multiplying i can get KMPH !

thanks anyway !


Re: Coords. and real distance - Threshold - 09.07.2015

Which can also easily be done by velocity... but whatever, waste your time.


Re: Coords. and real distance - amirab - 09.07.2015

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Which can also easily be done by velocity... but whatever, waste your time.
i know but i didn't say i don't use that
actually i'm using both for making a super anti cheat
like for Air Break !!!