Posts: 89
Threads: 0
Joined: Jul 2009
Reputation:
0
d = √ ( (x2-x1)І + (y2-y1)І + (z2-z1)І )
Posts: 1,843
Threads: 8
Joined: Nov 2008
Reputation:
0
There are many speedo scripts, why not look at some of them and get some idears?
Posts: 89
Threads: 0
Joined: Jul 2009
Reputation:
0
To be short and simple:
- GTA SA's distance units are meters.
- Measures distance between the actual player position and the previous player position
- Do it every seconds, you obtain a speed in meters per second (m/s)
- Now to convert to km/h, in one hour there are 3600 seconds and one kilometer is 1000 meters, so you just multiply by 3.6 (3600/1000). 10 m/s = 36 km/h
Posts: 857
Threads: 9
Joined: Jul 2009
Reputation:
0
If you want it really precise, you would need to account for the player's posZ.
Posts: 2,929
Threads: 160
Joined: Feb 2009
Reputation:
0
Hmm Thank you, I'll try to make one.. If I have problems I'll write it here..
Posts: 2,929
Threads: 160
Joined: Feb 2009
Reputation:
0
Sory for SPAM, but paytas I want to thank you.. Thank to you I've make the SpeedOMeter With TextDraw.. I'm gona open a topic soon..