The online racing simulator
Beta: LFSLapper V7.0.7.3 #11
Hello Lapperusers,

Here is a small Beta update for the upcoming version.

NOTE #1, The events in LFSLapper.lpr has been changed.
NOTE #2, LFS 0.6V is required

See the summary of changes below.

+---------------------------------------------------------------+
|Changes from 7.0.7.2 to 7.0.7.3 Beta #11
+---------------------------------------------------------------+
=================================================
New:
=================================================

1: New PlayerVar: "CarConfig"
GetCurrentPlayerVar("CarConfig");
// Configuration (Config byte)
// UF1 / LX4 / LX6 : 0 = DEFAULT / 1 = OPEN ROOF
// XRR / FZR : 0 = DEFAULT / 1 = DRIFT / RX
// FXR : 0 = DEFAULT / 1 = RX


2: New PlayerVar: "FrontWheelAdj" When Alternate setup config has been chosen.
Tyre width reduction (front)

3: New PlayerVar: "RearWheelAdj" When Alternate setup config has been chosen.
Tyre width reduction (rear)

4: New event: OnBlueFlag();
OnBlueFlag($userName,$userNameBehind,$Time)
$userName = Player were the blueflag is ment for
$userNameBehind = faster Player behind $userName
$Time = Time of flag

5: New event: OnYellowFlag();
OnYellowFlag($userName,$State,$Time)
$userName = Player that is causing the yellowflag
$State = Yellowflag 1 or 0 (on/off)
$Time = Time of flag

6: New PlayerVar: "Fuel" Display the fuel amount in percent "%" After player left the pit.
IF /showfuel=yes ELSE value = -1
7: New PlayerVar: "PitFuel" Display the fuel amount in percent "%" that is being add during a pitstop.
IF /showfuel=yes ELSE value = -1
=================================================
Changed:
=================================================

1: Maxlaptime that will be stored to the database have been increased from 30 to 90 minutes, for really long layouts.

2: [TEST] Record ID of Grip/Drift Database will now be shown in DumpVar(); for certain Car/track requests.
$list = GetListTop( getConfigVar( DefaultTopCar ), 0, 0 );
IF ( getConfigVar( DefaultTopCar ) == "XFG" )
THEN
dumpVar ( $list );
ENDIF

3: PlayerVar: "Fuel" : remaining fuel percent "%", will set when acrossing a split or completing a lap.

4: [Discord] Set multiple channels for sending texts to LFSLapper:
-open MyInc.LPR

You are allowed to set 5 channels, seperate them with a comma ",". see example below.
-$DiscordChannelReceive = "0000000000,0000000000,0000000000";

5: [Discord] Changed $DiscordUName to $UName.

6: [Discord] Added $UNameID into OnReceiveDiscordMessage():

7: [Discord] Event OnReceiveDiscordMessage()
-Number of arguments has been changed: OnReceiveDiscordMessage($ChannelID,$ChannelName,$UNameID,$UName,$Text)

=================================================
Fix:
=================================================

1: Wrong amount of arguments send to Event: OnPlayerSelectCar
2: Performance issues due to windows updates.
Removed some functions: Thread.Sleep(); this functions seems to malfunction on some PC's
3: Lappercrash when clicking on one of the layouts in the layoutlist.
4: Layoutlist didnt load the layout files properly into the list.
5: Lappercrash when a player using the JoinRequest function while being retired on the track.
=================================================
Removed:
=================================================

1: Event OnPlayerFlags();

Attached images
Blueflag.PNG
Yellowflag.PNG
New Betaversion released:

Requires LFS 0.6U21 to test it properly.
Grab the new version in the first post.

Changes:


1: New PlayerVar: "Fuel" Display the fuel amount in percent "%" After player left the pit.
IF /showfuel=yes ELSE value = -1

2: New PlayerVar: "PitFuel" Display the fuel amount in percent "%" that is being add during a pitstop.
IF /showfuel=yes ELSE value = -1

Would it be possible to get the record ID in the output? For example with this code:


<?php 
          $list 
GetListTopgetConfigVarDefaultTopCar ), 0);
          IF ( 
getConfigVarDefaultTopCar ) == "XFG" )
          
THEN
            dumpVar 
$list );
          ENDIF
?>

Which outputs this:


$list[4,"Total"] = 5
$list[4,"DatePb"] = "2021/02/05"
$list[4,"Laps"] = 2
$list[4,"PbBestSplitDiffLast"] = 30180
$list[4,"SplitTime1"] = 114590
$list[4,"CName"] = "XFG"
$list[4,"NickName"] = "^1Yis^7c[^4NL] ^1^s4"
$list[4,"Group"] = ""
$list[4,"SplitTime2"] = 0
$list[4,"TimePb"] = "11:19"
$list[4,"PbLapTime"] = 144770
$list[4,"UserName"] = "yisc[nl]"
$list[4,"PbBestSplitDiff1"] = 41050
$list[4,"PbBestSplitDiff0"] = 45390
$list[4,"PbBestSplitDiff2"] = 0
$list[4,"Pos"] = 5
$list[4,"SplitTime0"] = 72720
$list[4,"ListPb"] = "144770,172800"

But when I look in the DB, I see this:



It would be very useful to have the record ID and use that in other places, so information can be combined.
Attached images
lapper_db.PNG
Hello Yisc[NL] ,

Give this a try.

Attachment contains only the .exe.
Grab the LFSLapper dir from the first post if you dont have it yet.

Note: New beta version in first post.
New Beta version: Beta #4

NOTE: Requires LFS 0.6U22 to use/test these changes properly
Download the new beta version in the first post.

=================================================
Changed:
=================================================

1: [TEST] Record ID of Grip/Drift Database will now be shown in DumpVar();
$list = GetListTop( getConfigVar( DefaultTopCar ), 0, 0 );
IF ( getConfigVar( DefaultTopCar ) == "XFG" )
THEN
dumpVar ( $list );
ENDIF

2: PlayerVar: "Fuel" : remaining fuel percent "%", will set when acrossing a split or completing a lap.

New Beta version :Beta #5

=================================================
Changed:
=================================================
1: [Discord] Event OnReceiveDiscordMessage()
-Number of arguments has been changed: OnReceiveDiscordMessage($ChannelID,$ChannelName,$DiscordUname,$Text)

2: [Discord] Set multiple channels for sending texts to LFSLapper:
-open MyInc.LPR in Includes folder 'Bin/Default/Includes' .

You are allowed to set 5 channels, seperate them with a comma ",". see example below.
-$DiscordChannelReceive = "0000000000,0000000000,0000000000";

Attached images
Discordmessages1.png
Good job,
But to be perfect, instead of getting ChannelName, we obtain the discord id of the user.
But very good work!
what do you mean exacly with the "Discord ID of the user"
Is that the number behind the username like: Dan190NL#2141 ?

If yes, i can take a look to get that kind of info into $DiscordUname.

That means you have to split $DiscordUname into 2 separate values.


$IndexofID = indexOf( $DiscordUname, "#");

#Includes the Hashtag char
$DiscordUser = subStr( $DiscordUname,0,$idxOfFirtsSpace-1);
$UserID = trim( subStr( $DiscordUname,$idxOfFirtsSpace-1));

Quote from Bass-Driver :what do you mean exacly with the "Discord ID of the user"
Is that the number behind the username like: Dan190NL#2141 ?

If yes, i can take a look to get that kind of info into $DiscordUname.

That means you have to split $DiscordUname into 2 separate values.


$IndexofID = indexOf( $DiscordUname, "#");

#Includes the Hashtag char
$DiscordUser = subStr( $DiscordUname,0,$idxOfFirtsSpace-1);
$UserID = trim( subStr( $DiscordUname,$idxOfFirtsSpace-1));


Good afternoon Bass-Driver,
It's not that. If you have the developer tag on discord you get a button, to click on the user saying 'copy ID', for example.
With that id, you do, for example: "@<" . $discordid . ">", and you will mention the person.
That is good because the name of the person can change, but the id, is unique for each discord account and never changes.
Ah i see what you mean. Same thing as for channel ID for than for users.

Lemme check if that exists in the Discord API. I probably will make a new argument for that.
Quote from Bass-Driver :Ah i see what you mean. Same thing as for channel ID for than for users.

Lemme check if that exists in the Discord API. I probably will make a new argument for that.

Perfect!
Good job, mate! Thumbs up
New Beta version: 7.0.7.3 Beta #6

NOTE: Requires LFS 0.6U22 to use/test LFS Lapper beta changes properly
Download the new beta version in the first post.

=================================================
Changed:
=================================================

1: [Discord] Changed $DiscordUName to $UName.

2: [Discord] Added $UNameID into OnReceiveDiscordMessage():

Quote from Bass-Driver :New Beta version: 7.0.7.3 Beta #6

NOTE: Requires LFS 0.6U22 to use/test LFS Lapper beta changes properly
Download the new beta version in the first post.

=================================================
Changed:
=================================================

1: [Discord] Changed $DiscordUName to $UName.

2: [Discord] Added $UNameID into OnReceiveDiscordMessage():


Omg omg omg very fast! nice work!!!
New Beta version: 7.0.7.3 #7

NOTE: Requires LFS 0.6V

1: New PlayerVar: "FrontWheelAdj" When Alternate setup config has been chosen.
Tyre width reduction (front)

2: New PlayerVar: "RearWheelAdj" When Alternate setup config has been chosen.
Tyre width reduction (rear)

Feedback is welcome.
New Beta version: 7.0.7.3 #8
Available in first post.

=================================================
Fixed:
=================================================

1: Wrong amount of arguments send to Event: OnPlayerSelectCar

New Beta version: 7.0.7.3 #9

After 2 weeks of headaches and testing. It seems that the 20H2 windows updates cause several issues on some pc's. I still dont know what exacly cause the problem and how to fix it. But removing a function seems to "fix" the problem.

=================================================
Fixed:
=================================================
1: Performance issues due to windows updates.
Removed some functions: Thread.Sleep(); this functions seems to malfunction on some PC's with 20H2 Windows update

If someone knows how to fix this problem. Please let me know.
New Beta version: 7.0.7.3 #11 (skipped #10 for private testing)

While working on my Timeattack system, i discovered some bugs that cause Lapper crashes.

=================================================
Fixed:
=================================================

1: Lappercrash when clicking on one of the layouts in the layoutlist.
2: Layoutlist didnt load the layout files properly into the list.
3: Lappercrash when a player using the JoinRequest function while being retired on the track.

Beta #11 is working on a high CPU usage.
Tested Beta #9 and this seems to be fine.

i will investigate whats causing the high CPU usage.

Will release a new version ASAP.

EDIT #1: Webcommands sourcecode is causing the high cpu usage.
Thx Visual Studio Diagnostic tools.



I've disabled it for test and it seems to be fine now.
So bit more investigating todo.

EDIT #2:
Problem found and fixed.
Since Beta#9 i disabled a timer for closing button because this timer was causing problems. I Also disabled a another timer. This timer is placed in a loop to slow the loop down.
Since than is the loop looping alot faster than it suppose to be. Which cause the high CPU usage.
OOPSIE

The timer has been enabled again and CPU usage seems to be fine.
I will release a new version tomorrow.
Attached images
TWebCommands.PNG
This thread is closed

FGED GREDG RDFGDR GSFDG