+---------------------------------------------------------------+
|Changes from 7.0.7.1 to 7.0.7.2 | fixes/changes
+---------------------------------------------------------------+
=================================================
New:
=================================================
Nothing
=================================================
Changed:
=================================================
1: PlayerVar($userName,"Z"): Z-axis has now 2 decimals xx.yy
2: PlayerVar($userName,"Heading"); Heading values changed ((0 - 180 degrees) & (0 - -179) degrees) instead of 0-359 degrees
3: Message ingame when LFSLapper has been connected after (re)loading.
Handy when your LFSlapper instance is running like a service instead of an app for hosting services.
=================================================
Fix:
=================================================
1: JoinRequest(): Did not retreive the correct height from the player.
2: JoinRequest(): Cars heading not proper calculated.
+---------------------------------------------------------------+
|Changes from 7.0.7.0 to 7.0.7.1 | Discord feature Update/Fix
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: New function: SendDiscordEmbed(); #Create and send Discord Embed
#DiscordChannel to receive this embed.
$Channel = "";
#Set Title/Description and color of the discord embed
$Title = "Embed Title";
$Desc = "Embed Description";
#Prefix must contain '0x' Followed by 6 chars 0-9 and A-F
$Color = "0xFF0000"; #RED
#Field Values
## Use %nf% to create a new field. (Add %nf% to $FieldValue and $FieldInline aswell) ##
$FieldTitle = "Field_01 Title"; #Title of the Field
$FieldValue = "Field_01 Value"; #Value of the Field
$FieldInline = "True"; #Use 'True' or 'False' to set Inline Fields.
#Use %nf% to add a footer image URL !! Not an local(pc) image.
$Footer = "LFSLapper Footer: ".GetLapperVar("ShortTime");
#Small Image URL on the right side of the Embed box.
$ThumbnailUrl = "";
#The Entire EmbedBox will fit to the same size as the ImageUrl.
$ImageUrl = "";
#Function to send Discord Embed
SendDiscordEmbed($Channel,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);
=================================================
Fix:
=================================================
1: Couldn't use '\n' in discord messages
PlayerDetection()
player1+player2
+---------------------------------------------------------------+
|Changes from 7.0.7.0 to 7.0.7.1 Beta #1 |
+---------------------------------------------------------------+
- A Discordbot must be created to communicate between LFSLapper and Discord.
- In 'bin/default/includes/myInc.LPR' you can enter the 'DiscordToken' and the 'Discordchannel' to receive the messages from.
- Link to create a discordbot: https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
- Set DeveloperMode in your discordsettings to "ON' to copy the channel ID ( rightclick on the channel)
=================================================
New:
=================================================
1: New function: SendDiscordEmbed(); #Create and send Discord Embed
=================================================
Fix:
=================================================
1: Couldn't use '\n' in discord messages
<?php
#DiscordChannel to receive this embed.
$Channel = "";
#Set Title/Description and color of the discord embed
$Title = "Embed Title";
$Desc = "Embed Description";
#Prefix must contain '0x' Followed by 6 chars 0-9 and A-F
$Color = "0xFF0000"; #RED
#Field Values
## Use %nf% to create a new field. (Add %nf% to $FieldValue and $FieldInline aswell) ##
$FieldTitle = "Field_01 Title"; #Title of the Field
$FieldValue = "Field_01 Value"; #Value of the Field
$FieldInline = "True"; #Use 'True' or 'False' to set Inline Fields.
#Use %nf% to add a footer image URL !! Not an local(pc) image.
$Footer = "LFSLapper Footer: ".GetLapperVar("ShortTime");
#Small Image URL on the right side of the Embed box.
$ThumbnailUrl = "";
#The Entire EmbedBox will fit to the same size as the ImageUrl.
$ImageUrl = "";
#Function to send Discord Embed
SendDiscordEmbed($Channel,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);
?>
<?php
CASE "!embed":
#DiscordChannel to receive this embed.
$Channel = "";
#Set Title/Description and color of the discord embed
$Title = "LFSLapper Embed Title";
$Desc = "Embed Description";
#Prefix must contain '0x' Followed by 6 chars 0-9 and A-F
$Color = "0xFF0000"; #RED
#Field Values
## Use %nf% to create a new field. (Add %nf% to $FieldValue and $FieldInline aswell) ##
$FieldTitle =
"Field_01 Title"
."%nf%Field_02 Title"
."%nf%Field_03 Title"
."%nf%Field_04 Title";
$FieldValue =
"*Field_01 Value*\n*Field_01 Value*"
."%nf%Field_02 Value"
."%nf%```New BlockLine_01\nNew BlockLine_02\nNew BlockLine_03\nNew BlockLine_04\nNew BlockLine_05\nNew BlockLine_06\nNew BlockLine_07```"
."%nf%**Field_04 Value**\n**Field_04 Value**\n**Field_04 Value**\n**Field_04 Value**";
$FieldInline = "True%nf%True%nf%False%nf%False";
#Use %nf% to add a footer image URL !! Not an local(pc) image.
$Footer = "LFSLapper Footer: ".GetLapperVar("ShortTime")." %nf% https://velocitymsports.com/home/vmlogo.png ";
#Small Image URL on the right side of the Embed box.
$ThumbnailUrl = "https://velocitymsports.com/home/vmlogo.png";
#The Entire EmbedBox will fit to the same size as the ImageUrl.
$ImageUrl = "";
#Function to send Discord Embed
SendDiscordEmbed($Channel,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);
BREAK;
?>
+---------------------------------------------------------------+
|Changes from 7.0.6.3 to 7.0.7.0 |
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: New function: PlayerDelayedcommand(); #Start delayedcommand for a specific player
$UserName = "Bass-Driver";
$NameOfDelay = "CloseButton";
$DelayInSeconds = 3;
$SubCallBack = "ThisSub";
PlayerDelayedcommand($UserName,$NameOfDelay,$DelayInSeconds,$SubCallBack);
2: New function: RemovePlayerDelayedCommand(); #Remove delayedcommand for a specific player
$UserName = "Bass-Driver";
$NameOfDelay = "CloseButton";
RemovePlayerDelayedCommand($UserName,$NameOfDelay);
3: New function: RegisterPlayerDetection(); #Detect player within a fieldofview and distance.
#Example
#$userName = Set Player for the detector
$userName = "Bass-Driver"; #The Detector is now enabled for Bass-Driver
#$FieldOfView = Set range of the view to detect players. (degrees)
$FieldOfView = 30; #view will be 0 to 30 and 0 to -30
#$Distance = Max distance of detection (Meters)
$Distance = 25;
#$NameofSubDetected = Execute Subcallback when 1 or more players are detected.
$NameofSubDetected = "PlayerDetected";
RegisterPlayerDetection($userName,$FieldOfView,$Distance,$NameofSubDetected);
#==========================================
#Sub callback
#==========================================
#If there are multiple players in the field of view, $detectedPlayer outputs Player1+Player2+......
#This means you have to split the string into seperated players.
Sub PlayerDetected($userName,$DetectedPlayer)
OpenButton( $userName, "PlayerName",170,115,30,5,2,5,96, "^3Player: ^7".GetPlayerVar($DetectedPlayer,"NickName"));
OpenButton( $userName, "Speed",170,120,30,5,2,5,96, "^3Speed: ^7".GetPlayerVar($DetectedPlayer,"InstantSpeed")." km/h");
OpenButton( $userName, "Distance",170,125,30,5,2,5,96, "^3Heading: ^7".GetPlayerVar($DetectedPlayer,"Heading"));
EndSub
4: New Function: SetCarHandicap();
#This function applies handicap to all drivers using a particular car model
$Car = "XRT";
$H_Mass = 100; CarMass 0 - 200 in KG
$H_Tres = 10; Car AirIntake in %
SetCarHandicap($Car,$H_Mass,$H_Tres);
##################################################################################
#DISCORDBOT FEATURES
##################################################################################
5: New Event :
- This event will be executed when someone sends a discord message to LFSLapper.
- A Discordbot must be created to communicate between LFSLapper and Discord.
- In 'bin/default/includes/myInc.LPR' you can enter the 'DiscordToken' and the 'Discordchannel' to receive the messages from.
- Link to create a discordbot: https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
- Set DeveloperMode in your discordsettings to "ON' to copy the channel ID ( rightclick on the channel)
Event OnReceiveDiscordMessage($DiscordUname,$Text) # Player event
#Your code
EndEvent
#This function sends messages to your selected discordchannel.
#The discordbot must be connected while using this function
6: New Function: sendmessagetodiscord();
$DiscordChannel = "000000000000000000";
$Message = "Hello";
sendmessagetodiscord($DiscordChannel,$Message);
7: New setconfigvar() value: "DiscordBotStatus"
setconfigvar("DiscordBotStatus",$argv); #change the status of the discordbot
##################################################################################
8: New Playervar: 'CurrLap' GetPlayerVar($userName,"CurrLap");
retreive players current lap.
=================================================
Changed:
=================================================
1:Hostname now visible when lapper succesfully connected to a server.
2:New errormessages to MSS file before Lapper starting (faulty adminpass)
3:Realtime driftscore refreshrate is set to 5 times a second instead of 10.
4:NumtoMSH(); returns values in HH:mm.ss format, was HH.mm.ss before.
5:Event oncrossingchecker: returns now which insim checkpoint you crossed.
Checkpoint >>
1st checkpoint
2nd checkpoint
3rd checkpoint
Finish line
6:Event oncrossingchecker: returns time in H:mm:ss format.
7:GetWr(); allows 1 parameter "CAR". Example below
CASE "!getwr":
IF($argv != "")THEN
$GetWRInfo = GetWR($argv);
ELSE
$GetWRInfo = GetWR();
ENDIF
privmsg("^7============================");
privmsg("^3WR Info:");
privmsg("^7============================");
privmsg("^7Car: ^8".$GetWRInfo["CName"]);
privmsg("^7Track: ^8".$GetWRInfo["Track"]);
privmsg("^7Racer: ^8". $GetWRInfo["racerName"]);
privmsg("^7Time: ^8".NumToMSH($GetWRInfo["WRTime"]));
privmsg("^7Sp1: ^8".NumToMSH($GetWRInfo["Split1"]));
privmsg("^7Sp2: ^8".NumToMSH($GetWRInfo["Split2"]));
privmsg("^7Sp3: ^8".NumToMSH($GetWRInfo["Split3"]));
privmsg("^7Last: ^8".NumToMSH($GetWRInfo["SectorLast"]));
BREAK;
8:GetWR(); Added 2 new values: Date & Time. Date/Time of WR
$GetWRInfo["Date"]);
$GetWRInfo["Time"]);
9: Reduced IS_BTN Packetsize with 16 Bytes
10: Reduced IS_MTC Packetsize with 8 Bytes
11: Event: OnPlayerFlags
Changed Variables: Event OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$Value,$Time) # Player event
-Removed Lag Variable : it spammed the event alot in certain cases.
#Explaination of '$Value'
When $YellowFlag = 1
$Value : 1 == $userName is causing a Yellowflag
$Value : 0 == Clear
When $BlueFlag = 1
$Value : username == Faster Driver (username) is behind $userName
$Value : 0 == Faster Driver (username) overtook $userName
=================================================
Fix:
=================================================
1: WriteLine() :Lapper crash when try to convert special LFS characters
2: Write() :Lapper crash when try to convert special LFS characters
3: LFSLapper.LPR : one of the debugoption turned on
4: LFSLapper.LPR : debugmessages
5: No returning value when accidently applying NumtoMSH(); twice
6: Changed hardcoded visible records in Toplist/UserTop/Drifttop from 24 to 10000
7: Linux/mono users couldnt start Lapper on their computer
8: GetWR(); Couldnt get RO11 WRtime
9: Lappercrash when running 2 lapper instances with the same remoteport.
10: Lappercrash on Joinrequest() when Playerheight is lower than 0.
11: Returning Webrequests didnt execute.
// optional: InSim port
/insim=INSIMPORT
/insim=INSIMPORT
DEF1|gr1|LFSServer IP|INSIMPORT|./default|default_1.ini|autowork
<?php
<!DOCTYPE html>
<html>
<body>
<h1>Blah Blah Blah</h1>
<?php
if(isset($_GET["uname"]))
{
echo 'GlobalMsg("Welcome '.$_GET["uname"].'");';
echo 'privMsg("Welcome '.$_GET["uname"].'");';
echo 'cmdLFS("/msg Welcome '.$_GET["uname"].'" );';
}
?>
</body>
</html>
?>