The online racing simulator
thanks for the information. Smile
ill see what i can do with it.
New PublicTest: Linux update

This test contains "fixes" for Linux/mono users. Big thanks to Victor for that.

For this test i want to ask Linux users to test this Lapperversion. Ofcourse windows user may test this aswell.

Any feedback whould be welcome.
Attached files
LFSLapper.exe PublicTest_05.zip - 161.1 KB - 512 views
PublicTest_06
New PublicTest version:

This version contains:

-Communication with discord (bot)
-GetWR(); Change

YOU MUST DOWNLOAD THE ENTIRE DIRECTORY TO USE THIS TESTVERSION


=================================================
New:
=================================================
#########################################
#DISCORDBOT FEATURES
#########################################
1: 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 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

2: New Function: sendmessagetodiscord();
$DiscordChannel = "000000000000000000";
$Message = "Hello";
sendmessagetodiscord($DiscordChannel,$Message);

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

1: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;


Any feedback whould be welcome.
Attached images
DiscordTest_01.jpg
Getwr();.jpg
Attached files
LFSLapper V7.0.6.4 PublicTest_06.zip - 9.4 MB - 647 views
I dont know the systemrequirements of discord. Maybe your pc is to slow to run discord?
It could also be a corrupt version of discord. I suggest to download Discord from theire own website: https://discordapp.com/. I whould never install additional software from software that need to be installed.

Teamspeak:
You can create your own server. So all data goes between your server and the guests who are connected to your TSserver

Discord:
All channels within are connected to a server from Discord itself. Some people are afraid to use discord because of privacy.

You are also dependent to the servers of discord. When Discord goes down, you simply cant connect to discord anymore.

The interface of Discord is many times better than Teamspeak.
Discord also doesn't expose your IP to outside users (liek Skype did, which is the main target Discord worked on) which protects you from DDoS.
New publictest version:

-Couple fixes for Lappercrashes
-New feature for Discord
-Store Offline userdata


Lapperdirectory of testversion_06 is needed!

+---------------------------------------------------------------+
|Changes 7.0.6.4 from PublicTest_06 to PublicTest_08 |
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: New setconfigvar() value: "DiscordBotStatus"
setconfigvar("DiscordBotStatus",$argv); #change the status of the discordbot

=================================================
Changed:
=================================================
1:GetWR(); Added new value: 'DateTime' : Date/Time of WR
2:Store data for offline players ( Player + variable must exist in the database)
-only for functions SetUserStoredValue(); SetUserStoredNum();
-The player must be online first, to store theire data for the first time.
=================================================
Fixed:
=================================================
1: Lappercrash on Discord connect.

Attached files
LFSLapper_PublicTest_08.zip - 164.5 KB - 457 views
Hi Guys, why has this stopped working when I updated to this version...

DelayedCommand(1,Event_Checker);

Andy
Oke , a another compatible issue. Mistake on my end.
As i can see, you can putt 2 or 3 arguments in delayedcommand()


<?php 
delayedcommand
($CommandID,$NumberOfDelay,$SubCallBack)
or
delayedcommand($NumberOfDelay,$SubCallBack)
?>

Not sure why gai-luron did that in the first place. It is a littlebit confusing.
Restored the code of delayedcommand() and privdelayedcommand()

grab the new publictest version
Attached files
LFSLapper_PublicTest_08.zip - 164.5 KB - 501 views
Hi Dan DelayedCommand works fine now in 08

Thanks

Andy
New Publictest version: PublicTest_09

YOU MUST DOWNLOAD THE DIRECTORY of PublicTest_06 TO USE THIS TESTVERSION

- GetWr() Fix: Couldnt get RO11 WRtime. Compatible issue with Rockingham trackcodes (thanks to Andy King)
- GetWr() Change: DateTime value is now splitted in to 2 values : Date & Time

Attached files
LFSLapper_PublicTest_09.zip - 164.6 KB - 486 views
New PublicTest version: PublicTest_10

YOU MUST DOWNLOAD THE DIRECTORY of PublicTest_06 TO USE THIS TESTVERSION

This version contains a new change to store offline data.
New variable has been created. Add this line in LFSLapper.LPR

$StoreOfflineData = false; #storedvalue.dbs Store Offline data , even when the player doesnt exist in the database.

When this variable is set to 'true', a warning message will be displayed on your lapperconsole and in the MSS logfile, after reloading lapper.
Attached files
LFSLapper_PublicTest_10.zip - 164.7 KB - 521 views
Hi Dan, we have an issue with $StoreOfflineData....

Product:S3 Version:0.6U InSim Version:8
Warning: $StoreOfflineData = 1. Store Offline data enabled!
LFSLapper connected to: [AKM] Racing UK 4 [AKM Racing UK 4/127.0.0.1:25554]

Getting this error...
Var not defined on file: ".\default\LFSLapper_4.lpr" at line #24

Got it set as...
Line 24 = $StoreOfflineData = 0; in Lapper Constants

Andy
Good afternoon people,
I recently discovered a bug in the new test version (LFSLapper_PublicTest_10_B), the bug is: when any user enters a nickname that has a "-" with a different color from the rest of the sentence, they cannot interact with the database.
A simple script like this doesn't work:
CatchEvent OnNewPlayerJoin( $userName )
SetUserStoredValue( $userName , "bugTest" , 1 );
EndCatchEvent

and do this:
https://prnt.sc/pj80r6

Already tried to report the latest version (V7.0.6.3) and it does not give the bug.

The symbol in question is:
https://prnt.sc/pj83yk
PublicTest_14: Lapper V7.0.6.4
Hello Everyone,

It took a while, but here is a another PublicTest version.

Some important changes

Added: 'Currlap' playervar
Added: SetCarHandicap();
Removed: $StoreOfflineData = false; #storedvalue.dbs Store Offline data , even when the player doesnt exist in the database.

Known Issues:
-Read '/' (forward slash) from script.


Changelog:
#################################################################
#LFSLapper changelog: Updated @ 07-05-2020
#################################################################
+---------------------------------------------------------------+
|Changes from 7.0.6.3 to 7.0.6.4 Public Test_14B |
+---------------------------------------------------------------+
=================================================
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
#==========================================
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 player's current lap.
EndSub
=================================================
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

=================================================
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 theire computer (Testfase)
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.

Attached files
LFSLapper V7.0.6.4 PublicTest_14B.zip - 10.6 MB - 539 views
I am sure you want this version to be released (soon) at some point, but I like to make a request for this or next version.

To be able to use CarBehind in the OnPlayerFlags event.
The needed information is in the InSim packet:


struct IS_FLG // FLaG (yellow or blue flag changed)
{
byte Size; // 8
byte Type; // ISP_FLG
byte ReqI; // 0
byte PLID; // player's unique id

byte OffOn; // 0 = off / 1 = on
byte Flag; // 1 = given blue / 2 = causing yellow
byte CarBehind; // unique id of obstructed player
byte Sp3;
};

Indeed, i want to release this version as soon as possible, if this testversion is stable enough.
i think it is, because some lapper powered cruiseserver is hitting 20+ players sometimes.

i'm not that busy with LFS (more afk than actually doing something) and the good weather isnt helping either Tongue

Also, thanks for the request.
Will look into that tomorrow or this weekend.
Shouldnt be that difficult to add.

That means that the new OnPlayerFlags event will not be compatible with the old one.

Old OnPlayerFlags event: OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$Time) # Player event

New OnPlayerFlags event: OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$CarBehind,$Time) # Player event


Edit:
might used "wrong" insim packet for the playerflags.
I used the MCI insim packet for the yellow/blue/lag flags.
I have no idea if the blue flag of the MCI packet is the same as the FLG insim packet.

lets see, how i can combine the 2 packets together
-
(Bass-Driver) DELETED by Bass-Driver : MEH
Hi!
How can I edit the database of a player who is offline?

For Example:
CatchEvent OnNewPlayerJoin( $userName )
SetUserStoredValue( $userName , "bugTest" , 1 );
EndCatchEvent

But if the player is offline, you can't do it.
How can I do this?
(V7.0.6.4)
Hello, console reads "#" that hastag mark "^h" and its shows on discord same style.

2
This thread is closed

FGED GREDG RDFGDR GSFDG