Posts: 63
Threads: 22
Joined: Apr 2017
Reputation:
0
Hello, i want to save the kilometers driven by a player in all vehicles. I DONT wanna save VEHICLE kilometers, i need to calculate and save how many km's a player driven with a vehicle, doesnt matter which.
How to?
Posts: 6,242
Threads: 8
Joined: Jun 2008
It doesn't take a coding legend to figure out that you get the value from that filterscript, and count it each time the player gets in and out of the car...
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Distance = Speed x Time. Decide if you want to store distance in meters or kilometers. Set repeating timer for 1 second. Get speed in km/h. Convert to km/s (3600 seconds in an hour, so divide speed by 3600) or m/s (convert kilometers to meters (multiply by 1000) and then divide by 3600). Add value to player stat.