The online racing simulator
Searching in All forums
(3 results)
Stefan Renk
S2 licensed
okey thanks alot again!
ur the best
Stefan Renk
S2 licensed
Thanks alot.

it works
Need help with creating a List
Stefan Renk
S2 licensed
Hello guys, this is my first post

Im using The newest LFS_External version and C#.

My problem is:

I want to create a userlist like

1. Stefan | 55Pts.
2. ABC | 25Pts.
3. TEST | 22Pts.
4....
But i dont know how.....

What ive got:

Ive got the code to find out the best LapTime from all racers on the server.
Ok, I think i can make the same with Points on Server/Database.
In this code ive got only the BestTime on the server, but how to "calculate" now the 2nd BestTime

Heres the code for BestTime in the server/ of the race.
private void RES_RaceOrQualifyingResult(Packets.IS_RES RES)
{
byte UCID = Players[GetPlyIdx(RES.PLID)].UniqueID;

TimeSpan bestLap = TimeSpan.FromMilliseconds(RES.TTime);
string bestLapStr = string.Format("{0}:{1:000}.{2:00}", bestLap.Minutes, bestLap.Seconds, bestLap.Milliseconds);
if (RES.TTime <= BestLapTime)
{
BestTime = bestLapStr;//for BestTime Button
BestLapTime = Convert.ToInt32(RES.TTime); // for checking the best time
BestDriver = RES.UName;
}

InSim.Send_BTN_CreateButton("^0Best Lap Time: ^2" + BestTime, Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_LIGHT, 7, 62, 0, 69, 1, 255, 1, false);
}

The other stuff like the problem with points will be sloved if i know how to get 2nd BestTime 3th BestTime 4th BestTime 5....

I hope you can help me with that problem

Cheers Stefan Renk
FGED GREDG RDFGDR GSFDG