Jump to content

Travel Meter


Guest SpeeddeviL

Recommended Posts

Posted

hello, i have an idea...i got the travelmeter script from 'Nidza' and maybe its an idea to make it to KM...its now in meters but maybe its an idea to make it to km and then maybe on a other place on the screen of the game...

Posted
hello, i have an idea...i got the travelmeter script from 'Nidza' and maybe its an idea to make it to KM...its now in meters but maybe its an idea to make it to km and then maybe on a other place on the screen of the game...

Maths for 10 year olds ftw. :roll:

km = m / 1000

Do NOT PM ME for help unless invited. - New MTA Script Editor

Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.

Posted

robhol was right btw.

local KM = M / 1000

i.e if M was 6000, 6000 metres = 6 kilometres.

that make it easier to understand?

2hplsom.png

Posted

To sum it up, triangle style: (which is a useful trick for any equation with 3 links, like v = s/t, U = R·I, whatever, if you don't want to, or can't, solve it like an equation):

-km-

m · k

km = k * m = 1000 * m

m = km / k = km / 1000

1000 = km / m

km and m measure the distance traveled, k = 1000 (constant)

All done with the math lesson? :D

Do NOT PM ME for help unless invited. - New MTA Script Editor

Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...