The online racing simulator
0-100Km/h and 0-160Km/h Counter
I want to measure 0-100 time and 0-160 at the same time please help!

Lapper 5.716
You'll have to use both the $AccelerationEndSpeed (which shows speed in km/h) and $AccelerationEndSpeedMph (which shows speed in mph), but show the answer for the mph speed in km/h.

160km/h is approx 100mph, therefore change the 60 in
$AccelerationEndSpeedMph = 60;
to
100

Then try the following code;

Add the following line
$kmh_mph_conversion = ($AccelerationEndSpeedMph x 1.6)

Change existing line
Event OnAcceleration()
privMsg( "^8Accelerated in ^3" . $AccelerationTime . "^8 seconds to " . $AccelerationEndSpeed . " " . $UnitSpeed ."!" );
EndEvent

to

Event OnAcceleration()
privMsg( "^8Accelerated in ^3" . $AccelerationTime . "^8 seconds to " . $AccelerationEndSpeed . " " . $UnitSpeed ."!" );
privMsg( "^8Accelerated in ^3" . $AccelerationTime . "^8 seconds to " . $kmh_mph_conversion . " km/h" );
EndEvent

It's very early in the morning, and I'm tired, and I hope the above code works. If not, you should hopefully understand what I'm trying to do, and fix any errors yourself.
Thank you! I'll try that, btw I was trying to add Event's but I don't know where to find them, I mean for example Event OnAcceleration where can I find all these commands? because I'm new in this ...
I meant to show show 0-100 Time seperately and 0-160 separately, it show same time $kmh_mph_conversion = ($AccelerationEndSpeedMph x 1.6) and there is something wrong with this I cant get it working
Quote from MADNJPN :Thank you! I'll try that, btw I was trying to add Event's but I don't know where to find them, I mean for example Event OnAcceleration where can I find all these commands? because I'm new in this ...

You will find them all within the lfslapper.lpr file - search for 'Event On'.

You are using a very old version of lapper, which has had a lot of changes in years since, and it may be hard to get forum support for it unless someone still using it, or unless the bit you want help on hasn't changed much.

If you want newer version, look HERE.

In the newer version, there is a directory called "doc". Within it, is a file called 'Lapper Events.txt'.

This lists all the events that are available.

An 'event' just means that when the specified event happens, you can have a bit of code activate. For instance, I have an event 'On RaceEnd', and the code that activates and shows 'flags' with the first few drivers names on them, by position - see HERE for what I mean.

There is also another file called 'player Vars.txt', which lists all the player variables that can be 'collected' and shown, such as split/sector times, pit details, laps, acceleration, etc.
Quote from MADNJPN :I meant to show show 0-100 Time seperately and 0-160 separately, it show same time $kmh_mph_conversion = ($AccelerationEndSpeedMph x 1.6) and there is something wrong with this I cant get it working

Don't think this has changed any from versions 5 to 6, so may have look at.
Great thank you very much, but the thing is I've changed almost everything in 5.716 and I just don't want to start all over after going with newer version :S But thank you for your responses I love all your scripts )
whoops, hit wrong button!
Quote from MADNJPN :I meant to show show 0-100 Time seperately and 0-160 separately, it show same time $kmh_mph_conversion = ($AccelerationEndSpeedMph x 1.6) and there is something wrong with this I cant get it working

Been doing some testing, and it would appear that you can't have 2 different end speeds, even if they're kmh and mph.

Lapper takes the whichever time is the longest as the $acceleration time, which you can't change, and will give you that time for both kmh and mph.
Attached images
lapper acceleration code and results.png

FGED GREDG RDFGDR GSFDG