SA-MP Forums Archive
[Include] Get/Set Distance in Kilometers/Meters. - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Get/Set Distance in Kilometers/Meters. (/showthread.php?tid=283766)



Get/Set Distance in Kilometers/Meters. - TheArcher - 16.09.2011

Delete due to OUT OF DATE script.


Re: Get/Set Distance in Kilometers/Meters. - juraska - 16.09.2011

Looks interesting, I'll test it later.
good job


Re: Get/Set Distance in Kilometers/Meters. - TheArcher - 16.09.2011

It's hardly to know CJ's statistics. But about two points is more easy.

It's only calculating Kilometers or Meters between a point to actual player position. For exemple.

The player has the cooridantes in the moment
pawn Код:
1958.378295 1343.157226 15.374600
And will calculate the position between the first and this one.
pawn Код:
1680.2393,2776.2144,10.8203
at the end will show how many kilometers or meters are between those two points.


Re: Get/Set Distance in Kilometers/Meters. - playbox12 - 16.09.2011

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
It's only calculating Kilometers or Meters between a point to actual player position. For exemple.

The player has the cooridantes in the moment
pawn Код:
1958.378295 1343.157226 15.374600
And will calculate the position between the first and this one.
pawn Код:
1680.2393,2776.2144,10.8203
at the end will show how many kilometers or meters are between those two points.
So, it actually calculates the distance in GTA Units, not actual realword kilometers?


Re: Get/Set Distance in Kilometers/Meters. - TheArcher - 16.09.2011

Quote:
Originally Posted by playbox12
Посмотреть сообщение
So, it actually calculates the distance in GTA Units, not actual realword kilometers?
Well, i think so beacuse if you want to go from LS to LV by calculating real kilometers and meters, will be like 5km + think that the cars goes over 100km/h in about 2 - 3 secs even the bikes :S


Re: Get/Set Distance in Kilometers/Meters. - TheArcher - 16.09.2011

Quote:
Originally Posted by ******
Посмотреть сообщение
Wait, sorry, I still don't understand. Does this just get the distance between two points in GTA units, or do you actually convert that distance to metres, and if so I refer you to my original question about conversion ratios.

Also, can you put the code on pastebin please?
Here you go.

http://pastebin.com/itcFtict

I saw now that i did some mistakes about the pointsid but i'm working on.


Re: Get/Set Distance in Kilometers/Meters. - wups - 16.09.2011

Meters aren't equal to sa-mp units.
So it should be called GetDistance (in Kilounits/Units).


Re: Get/Set Distance in Kilometers/Meters. - TheArcher - 16.09.2011

Quote:
Originally Posted by wups
Посмотреть сообщение
Meters aren't equal to sa-mp units.
So it should be called GetDistance (in Kilounits/Units).
The real San Andreas length of roughly (LA, LV, SF) has around 1300km (800,milles). The "GTA Units" has almost the same length.