$DayNow = GetLapperVar(ShortDate);
$DayNowPlusFive = GetLapperVar(ShortDate,+5);
#DISCORD EMBED MESSAGE
$Title = "";
$Desc = "";
$Color = "0xFFFFFF";
$FieldTitle = "Test Day";
$FieldValue = StripLFSColor("**Day Now: **".$DayNow."\n **Day Now + 5: **".$DayNowPlusFive."");
$FieldInline = "True";
$Footer = "";
$ThumbnailUrl = "";
$ImageUrl = "";
SendDiscordEmbed($DiscordChannel_cmd,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);
$Text = Replace( "Day Now: ".$DayNow." + Day Now + 5: ".$DayNowPlusFive."","/","-");
#DISCORD NORMAL MESSAGE
sendmessagetodiscord($DiscordChannel_cmd,StripLFSColor($Text));
<?php
CASE "!day":
privmsg("Date Now: " .GetLapperVar(ShortDate));
privmsg("Date Now + 5: " .GetLapperVar(ShortDate,+5));
BREAK;
?>
$NewDate = GetLapperVar(LongDate,+5);
$NewDate2 = GetLapperVar(LongDate);
$NewDate = GetLapperVar(ShortDate,+5);
$NewDate2 = GetLapperVar(ShortDate);
GetLapperVar(ShortDate): Possible to add an 2nd parameter to add/delete days
$NewDate = GetLapperVar(ShortDate,5); // Adds 5 days to the current date
$NewDate = GetLapperVar(ShortDate,+5); // Adds 5 days to the current date
$NewDate = GetLapperVar(ShortDate,-5); // Deletes 5 days from the current date
OpenTextButton($userName, "TestBtn",75,53,50,5,5,32, "^H^7Girilecek kullanıcı adı","^H^3Girilecek kullanıcı adı",2,BLAH);
OpenButton($userName, "TestBtn2",75,63,50,5,5,-1,32, "^7Girilecek kullanıcı adı");
V2.8.0 (21-01-2023)
Update: Helpmenu Overhaul, new fresh UI
Add: Shift+I feature to enable/disable TOP hud
Fix: No purple sectorscolor for first car/stage combo
Fix: Couldn't get WR Splittime after crossing a checkpoint.
Fix: You could report yourself in the reportsystem.
V2.9.0(28-04-2023)
Update: LFSLapper library updated to V7.0.9.4 Experimental, which is needed for some updates.
Update: Caution message instead of yellow blinking button that make the sectortimes disapear.
Update: TimeTable loader.
-Layoutloader function has been removed.
-Instead of accessing a window to load the timetable you have to load it by command. (!l <timetable name>)
This is a much faster way to load timetables for future events or track/layout changing.
Update: New option in TimeTable (!times)
Toggle between fastest time / the name of player to see who set the fastest time.
New: Top 10 leaderboard. Accessible from the top HUD.
New: Admins be able to load the TimeTable from Discord without joining the server (!l <timetable name>)
New: Rank window(!rank).
-Current Rank/Exp Points
-Total Distance
More coming in future updates
New methode to save/load these rank variables, more prepation must be done before releasing the insim on the public server. YAAY
New: Player settings menu in helpmenu
-Discord Ping (optional): Ping player on discord if the fastest time get beaten.
-Enable/Display Objective Window after finish the stage.
More coming in future updates
============================================================================================
1. Follow this guide by Mono: https://www.mono-project.com/download/stable/#download-lin
2. Install Mono dependencies using sudo apt install libmono-i18n4.0-all
3. Make sure you're in LFSLapper.exe directory and run the command Mono LFSLapper.exe.
============================================================================================
################################################################
#LFSLapper changelog: Updated @ 18-02-2023
#################################################################
+---------------------------------------------------------------+
|Changes from 7.0.9.2 to 7.0.9.3
+---------------------------------------------------------------+
Thx to iceman121 for Testing LFSLapper on his Linux server Ubuntu 20.04.5 LTS.
=================================================
Fix:
=================================================
1: Coundn't run LFSLapper on Linux
=================================================
New:
=================================================
1: Save offline playervalues to the StoredValue.dbs Database
-You can use SetUserStoredValue() with the same parameters SetUserStoredValue($userName, $Variable, $Value);
-Be sure the username is correct.
-Nickname will not be saved. The database adds the NickName when the player join the server.
2: New variable when retreiving data from the StoredValue Database
ListCount : counts the total of the requested Variable
$list = getlisttopuser($value,$flagdesc,$flagNear,$StartPos); #Get List from stored database
$list["ListCount"];
<?php
Create/Edit/Read/ Textfiles
#===================================================
#Create textfiles (Include FileExist options) (only .txt extension)
#===================================================
$FileName = "Filename";
$NameofDirectory = "C:\Users\User\Desktop";
$FileExistOption = 0;
What todo if file exist:
0 = no action
1 = overwrite file
2 = overwrite file + create backup file.
CreateFile($FileName,$NameofDirectory,$FileExistOption);
#===================================================
#Read file (Possible to read various Filetypes: .log/.txt/.ini/.cfg.lpr)
#===================================================
$LinesofFile = Readfile($Filename,$Folder);
What info you get from file.
-FileSize in bytes
-CreationDate/Time
-ModificationDate/Time
-Number Of lines
-LineNumber
-Text from each line
!!!!EXAMPLE CODE!!!!
$Filename = "TestFile";
$Folder = "C:\Users\Danny\Desktop";
$Extension = ".txt";
$LinesofFile = Readfile($Filename,$Folder,$Extension);
$NrOfLines = ToNum($LinesofFile["NumberOfLines"]);
$FileCreationDate = $LinesofFile["TimeOfCreation"];
$FileModificationTime = $LinesofFile["TimeOfModification"];
$FileSize = $LinesofFile["FileSize"];
privmsg("Reading file: " . $Filename . "" .$Extension);
privmsg("NumberOfLines: " . $NrOfLines . "");
privmsg("Size of file: " . $FileSize . " bytes");
privmsg("Creation time: " . $FileCreationDate . "");
privmsg("Modify time: " . $FileModificationTime . "");
FOR ( $i = 0; $i <= $NrOfLines-1 ; $i = $i + 1)
$linenr = $LinesofFile[$i,"LineNumber"];
$line = $LinesofFile[$i,"Line"];
privmsg("[".$linenr."]: ".$line);
ENDFOR
!!!!!!!!!! USE THE FOR/WHILE LOOP, ONLY FOR THE LINES YOU WANT TO BE DISPLAYED ON YOUR SCREEN !!!!!!!!!!!!!!!!!!!
#===================================================
#Edit file (Possible to edit various Filetypes: .log/.txt/.ini/.cfg/.lpr)
#===================================================
$Filename = "TestFile";
$Folder = "C:\Users\Blah\Desktop";
$NewText = "TESTTEST";
$LineToEdit = -1; # -1 to create a extra line
$Extension = ".txt";
EditFile($Filename,$Folder,$NewText,$LineToEdit,$Extension);
#Delete a single line in the file.
#Set '-1' as $NewText and set $LineToEdit which line you want to delete.
$Filename = "TestFile";
$Folder = "C:\Users\Blah\Desktop";
$NewText = -1;
$LineToEdit = 5;
$Extension = ".txt";
EditFile($Filename,$Folder,$NewText,$LineToEdit,$Extension);
?>
#################################################################
#LFSLapper changelog: Updated @ 05-02-2023
#################################################################
+---------------------------------------------------------------+
|Changes from 7.0.9.1 to 7.0.9.2
+---------------------------------------------------------------+
Thx to iceman121 reporting the joinrequest() LFSLapper crash.
=================================================
Fix:
=================================================
1: Joinrequest() didn't execute when Z-value is 0.
2: LFSLapper crash on wrong carheading value in joinrequest().
3: Event 'onDistDone' executed after teleporting using JoinRequest().
4: Internal distmeter code did execute when a player is not moving.
5: Internal distmeter code did execute when a player is joining the track.
6: Warning on console about missing a script when LFSLapper is booting.
#################################################################
$UserName = "Bass-Driver";
$Hexcolor = "FFFFFF" #White
PlayerArrowColour($UserName,$HexColor);
CASE "!heading":
privmsg("Current heading of the car: ".getcurrentplayervar("Heading"));
BREAK;
Current heading is 90
Set headingvalue in joinrequest() to -90
Current heading is 45
set headingvalue in joinrequest() to -135
+---------------------------------------------------------------+
|Changes from 7.0.9.0 to 7.0.9.1
+---------------------------------------------------------------+
=================================================
Fix:
=================================================
1: requesting toptimes(!top <carid>) / driftscores(!drf) from modded cars doesn't always appear. Always returned the times from (mod)cars set in $DefaultTopCar.
Now it displays the time/score of the car you are currently driving or by requesting the specific time by !top <carid>.