The online racing simulator
Searching in All forums
(893 results)
Bass-Driver
S3 licensed
Deleting messages from a channel will a pain.
  • First you need to ask your Discordbot to create a list of MessageID's you want to delete.

  • Second: send a command to your discordbot to delete the list of messageID's.
This requires 2 functions to delete a message. This is kinda confusing and time consuming. Because you need to check the discordchannel beforehand to get/copy all the messageID's.

I've been looking to update a message (created by a bot), so you do not need to create a new message anymore.
But, need to dive deeper into the code to proper implement this feature into Lapper. Not sure when that will be.

Maybe its handy to create a command that users can execute, to display the playercount in the server. Instead of spamming the channel.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Its not possible to send a Discord PM's by LFSLapper.

You can mention a user (V7.0.9.4), but that requires their Discord UserID.

EDIT: Also sending a PM requires their UserID.

EDIT2: Looking at the code, i think its not to hard to implement this feature in LFSLapper.
https://stackoverflow.com/ques ... ssagepm-to-specified-user
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
This is soo odd. It didn't saved the changes, i made in visual studio.
but it took the changes when i compiled it.

Download the file again.
Bass-Driver
S3 licensed
LFSLapper is opensource.
Download lapper and open the src folder.

Open the projectfile in visual studio and you can edit the code.

For the last .exe, i've attached the file that has been edited.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Increasing the demo playerlimit doesnt help either, because of the lack of content the Demonstration version is having. But thats what a demo version is. So you might get bored quickly, no matter what the playerlimit is.

Its better to save some money. And buy S3. Or help each other.

Also LFS might require higher specs with the new Graphical update. So if you have trouble with running LFS atm, it will be worse with the new graphical update.
Bass-Driver
S3 licensed
try now, uploaded a new .exe
Bass-Driver
S3 licensed
Here's the new LFSLapper.exe with the debugline
Last edited by Bass-Driver, . Reason : Yup
Bass-Driver
S3 licensed
uhhhhh whuups, that is one of the debug lines that i used for the character issue.
Seems i forgot a hidden debug line. Ill ignore the line and post a new .exe asap
Bass-Driver
S3 licensed
i hope there is. I did some tests in the past with encoding the characters, but did not get the results i hoped for to fix the issue.
Need to dig deeper into the code and understand what it does.

I hope it's something small that need to be changed.
Bass-Driver
S3 licensed
Thank you,

Some functions were created for the TimeAttack addon in the beginning of this year. And since then, i didn't do much on LFSLapper.
I had figure out where to add new functions etc LOL.

The biggest challenge was displaying the buttons in the garagemenu.
Adding new parameters breaks all buttonfunctions. So that is a nogo.
So i came up with manipulating the BStyle value. Its working, but i prefer a new parameter that you could set 1 or 0.
Release: LFSLapper V7.0.9.4
Bass-Driver
S3 licensed
Hello Lapperusers,

Here's a new version of LFSLapper that contains multiple new features.
Some of the features require LFS Version D50 or higher(Client and Host)

See the summary of changes below.

See you on the track.


+---------------------------------------------------------------+
|Changes from 7.0.9.3 to 7.0.9.4
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: New Discord Feature MentionDiscordUser()

$DiscordChannelID = "123456789";
$DiscordUserID = "123456789";

MentionDiscordUser($DiscordChannelID,$DiscordUserID);

2: New Function: GetListOfDirectories();

#Get list of directories
$ListOfDirectories = GetListOfDirectories("");

#Get NumberOfDirectories
$DirCount = $ListOfDirectories["NumberOfDirectories"];

#Get through all the directories
FOR($i = 0; $i < ToNum($DirCount); $i = $i + 1)

$NameOfDir = $ListOfDirectories[$i,"DirName"];
$CreationDateOfDir = $ListOfDirectories[$i,"DirCreated"];
$LastAccessedOfDir = $ListOfDirectories[$i,"DirAccessed"];

privmsg("NameOfDir: ".$NameOfDir);
privmsg("CreationDateOfDir: ".$CreationDateOfDir);
privmsg("LastAccessedOfDir: ".$LastAccessedOfDir);

ENDFOR

3: New Function: SetPlayerHandicap(); LFS Version (Client & Host) D50 or higher
Set handicaps for multiple players at once, only when the player is On Track

UserName are capital sensitive.
Mass value 0 - 200
Intake value 0 - 50

SetPlayerHandicap("UserName1:Mass:Intake,UserName2:Mass2:Intake");
SetPlayerHandicap("Bass-Driver:200:50,finland69:100:10");

4: New Function: GetListPlayerHandicap(); LFS Version (Client & Host) D50 or higher
This function executes Event: OnPlayerHandicap(), see below

5: New Event: OnPlayerHandicap(); LFS Version (Client & Host) D50 or higher

#Event will execute when the players handicap has been changed by command or by insim: SetPlayerHandicap()
#LFS Commands:
#/h_mass username X - set added mass for user's car
#/h_tres username X - set restriction for user's car

#$userName = Username of player
#$Flags: 1 = Mass Changed
#$Flags: 2 = Intake Changed
#$Flags: 3 = Both Handicaps Changed

$H_Mass = Current value mass
$H_Tres = Current value Intake restriction

Event OnPlayerHandicap( $userName,$Flags,$H_Mass,$H_Tres) # Player event
globalmsg("Handicap has been changed");
globalmsg("UserName: ".$userName);
globalmsg("Flags: ".$Flags);
globalmsg("Intake Res: ".$H_Tres);
globalmsg("Mass: ".$H_Mass);
EndEvent
=================================================
Update:
=================================================
1: New buttonfunction: Display button in garage.
I've been looking to display the button in the garagemenu
I think its a nice workaround without breaking the buttonfunctions.

Type the number 255 to the ButtonStyle parameter to display the button in the garage.

Example:

openPrivButton( "test",50,60,100,15,0,-1,32+64+255, "Test" );

=================================================
Fix:
=================================================
1: Potential fix for LFSlapper crash when modsystem isnt available from LFS.net

=================================================
Known Issues:
=================================================
1: No encoded characters in (clickable) textbuttons


EDIT: New LFSLapper.exe without debuglines.
https://www.lfs.net/forum/post/2067050#post2067050
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Do the new commands require a new hostversion?

/h_mass username X - set added mass for user's car
/h_tres username X - set restriction for user's car
/teamarrows=no/yes - arrows on non-race small map use name colour

Because i get unknown commands by all of them.
And was adding some LFSLapper functionality with the new ISP_PLH insimpacket.
But cannot test it.
Bass-Driver
S3 licensed
V7.0.8.1

Just stop playing on the illegal version of LFS. And play the legitimate
version of LFS. The chance of support is mugh higher.
Bass-Driver
S3 licensed
you can copy unicode characters into LFS and any texteditor with UTF-8
that should work

7.0.8.0 is just outdated. That version doesnt have MOD support.
Bass-Driver
S3 licensed
You can use the getangle() function.

it calculates the angle between you and the object/location based on the X&Y coords.

Example:
$GetAngleInDegrees = GetAngle($userName,"-387:-635");

IF((ToNum($GetAngleInDegrees) > 80)&&(ToNum($GetAngleInDegrees) < 120))THEN
privmsg(>>>);
ENDIF

Bass-Driver
S3 licensed
In lfslapper.lpr an event named: OnExitPitLane.This event will be executed when someone drives to the end of the pitlane.

within this event add:

cmdLFS( "/p_clear " . GetCurrentPlayerVar( "UserName" ));

Bass-Driver
S3 licensed
Nah, i forgot to delete the include() line in addonsused.LPR during release. Which contains lfsrestapi_info.lpr.
I've used that script during the implementation of the modsystem.

So you can delete that include() line.
Bass-Driver
S3 licensed
Sorry to interrupt the chat.

@ F. Leterme

I've joined the server you are in, which is [PNR] Blackwood GTI
Is this server yours?

-It's defined as a S1 licensed server, which doesn't have mod support. Must be a S3 licensed server.
-You use LFSLapper V 7.0.9.1, which is not the latest but, should be fine with mods.
-You use Schedule V2.09, which is not the latest version of the Yisc[NL] Schedule script, this version does not have mod support.

-Make sure you load the latest version of Yisc[NL] Scripts.
-Allow mods on your server.

IF LFSLapper crashes.

Try to make a screenshot of the LFSLapper console when it crashes.
Copy the last error from the 123.456.789.000-XXXXX-ERR.log (bin\default\logs)
Bass-Driver
S3 licensed
to which version of LFS, you want connect the insim to?
Insim v9 doesn't work on 0.6R

It only works on 0.7A and newer.
Bass-Driver
S3 licensed
Well, you start the app 'Anti ddos guardian' and LFSLapper stopped working.

What do you think what happenend?
Bass-Driver
S3 licensed
I have no experience with MySQL or any knownledge of databases. Or the time / motivation to work on the LFSLapper source. Even with adding a new database system, it will cost ALOT time to figuring out how to add it within LFSLapper. So its a no for me.
It took already alot of time to add the MOD functionality, which i have no idea how i made it work, even with the help of the awesome lfs community.

But still SQlite is fine for the purposes LFSLapper has to offer. No way to add a another complicated system to LFSLapper which may require an external APP to function.

So there are 3 options
  • You use the current SQLite database and its functionality within LFSLapper.
  • You move to Insim.net library.
  • You add MySQL to LFSLapper yourself , the code is opensource.
Bass-Driver
S3 licensed
It whould nice to add "insim nodes" with ID's (1 - 1024 (or more)) as a option in the AutoX editor.

And send a InsimPacket to the insimapp when someone cross a node.

could look something like this (Probably totally wrong LOL)

struct IS_NOX // Insim Node xTime
{
byte Size; // 15
byte Type; // ISP_NOX
byte ReqI; // 0
byte PLID; // player's unique id

word Node; //Node ID
byte Sp1; //Spare 2
byte Sp2; //Spare 3
byte Sp3; //Spare 4

unsigned Time; // hundredths of a second since start (as in SMALL_RTP)
};

Edit: The AutoX object count need to be increased by uhm ALOT.
For example: i run a timeattack server which has 6 stages. If i want to add 1024 nodes on each stage which is in total 6 * 1024 = 6.144 objects.
Or you need to add a seperate SubObject counter like you have done with the restricted area circles.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Either the ip or port is incorrect.
Check firewall aswell
Bass-Driver
S3 licensed
The discord features should work.
Why you using LFS 6R in the first place.

You cannot use S1/S2/S3 content on 6R aswell because you have a demo account.
Bass-Driver
S3 licensed
Don't see anything obvious.
You must do some test with the values and see cause the crashes.
FGED GREDG RDFGDR GSFDG