The online racing simulator
Lfs Lapper Help!!!
Hello. Im hosting a Demo Sever. With LFS Lapper with drift points. Ive noticed sometimes when a player joins. Lapper Kicks them Automatiaclly. I have the server setup for practice mode.
Ive tried to check the logs to see why they're getting kicked. It doesnt say anything. Ive spent hours of searching forums and the LFSLApper.lpr.

Thanks
Can you upload your lapper file?
Then I am more then happy to have a look at it.
Ok here it is.
Thank you Yisc[NL]!!!
Attached files
LFSLapper.lpr.zip - 17.7 KB - 282 views
I've inspected your file and found 2 possible moments for a kick to happen:

- When people press the Deny button after having entered the server
- When someone floods the chat

Other then that, no auto-kick events are defined in the file you gave me.
So either your LFS server kicks them for a reason like wrong way driving or using a modified car far, or there are one or more other LFS scripts in place and a kick is coming from there.
Either way, the LFS server log is always showing kicks, so you might be able to find the cause there as well.
If you want me to have a close look at all the files, do the following:

-Make a copy of your LFS directory
-Remove all passwords in the files of that copied directory
-Make a copy of your LFS Lapper directory
-Remove all passwords in the files of that copied directory
-Zip the copied LFS server directory
-Zip the copied LFS Lapper directory
-Upload both files here

If you upload them, I will have a look at the files tomorrow.
Alright thanks. Maybe it is just them hitting Deny :P.
It just happens so often.
I think i disabled the accept and deny buttons.
Here is my Server and Lapper Files.
Attached files
lapper.zip - 1.9 MB - 435 views
lfsdediserver.zip - 1.9 MB - 334 views
I have taken a look at your LFS dediserver files and noticed there was room for some improvements.
So I made those improvements for you and zipped all the files again.
When you have unzipped the file you will find a shortcut named "start LFS server"
Use that to start your server, as it will point to the config file which is located in the "_config" folder.
I've also created a folder to store the log files in, and made a directory for the replays and layout files.

You do need to set the correct name for your server, as well as the admin password and maybe other port numbers for LFS and InSim, but I think you will be able to handle that

You did disable the Deny button in the last Lapper file you gave me, so that shouldn't be a problem anymore.
I did notice a couple of time-out messages in your Lapper logfile, so I suggest you change a value in your "LFSServers.cfg" file, which is found in the "bin" directory.

Change this: timeOutScript=2000;
To this: timeOutScript=5000;

Then close and start Lapper again.
Let LFS and Lapper run for a while and keep an eye on the log files.
Attached files
lfsdediserver_2.zip - 1.9 MB - 285 views
Thank you, So far so good. I haven't noticed any random kicks or anything.
I have noticed im still getting alot of these in the lapper logs. "6/19/2014 9:26:21 AM -> Warning packet not catched (55)". It seems to be flooding my log

Any idea on how to make addon. With buttons and a popup msg to appear when a driver spectated?
Quote from carmaniac1993 :Thank you, So far so good. I haven't noticed any random kicks or anything.
I have noticed im still getting alot of these in the lapper logs. "6/19/2014 9:26:21 AM -> Warning packet not catched (55)". It seems to be flooding my log

Any idea on how to make addon. With buttons and a popup msg to appear when a driver spectated?

I have these messages in my logs as well.
Nothing you can't do about them, untill someone picks up the developement of Lapper again.

Which is Event is used to spectate the player?
You could create buttons and messages within that Event, or re-direct the script to another SubEvent.
Alright so its normal.
I honestly dont know where to start.
Is there a forum on how to make your own addons?
Or can you help me with a sample script?
I just want to make it when a player spectates. A box with a msg will appear. with one button. To close it out.

Also in my addons.lpr. There is something called #include( "./web_player.lpr");
What does that do?
No, there isn't a forum where you can learn to make you own addons.
This forum is the best place to ask for help, but only in a way like "I made this and that and got stuck now".
Not to blame you in any way, you have been very friendly, but lately too much people come in here asking for this and that and even when you do help them with scripts, they are ungrateful and ask for more.
While the best way to learn something, is by doing it your self and ask for help when you get stuck at some point.

Having said that, I am here to help you, so if you could tell me when a players gets spectated, I can see which event in Lapper that is and can then create a small script for you to get you going.

I don't know what that addon does (need to look into the code), but all lines starting with # are disabled lines in Lapper (see, first thing learned here )
I completely understand.
Im willing to learn.

"so if you could tell me when a players gets spectated"
Do you mean in my server log?
Quote from carmaniac1993 :I completely understand.
Im willing to learn.

"so if you could tell me when a players gets spectated"
Do you mean in my server log?

No, what has a player got to do, to get spectated?
Like standing idle for X time, speeding in pit lane, etc
Just whenever they spectate or get spectated.
Quote from carmaniac1993 :Just whenever they spectate or get spectated.

Second learning point then
Lapper is driven by events, so when something happen in LFS, Lapper does something.
Example, someone joins a server, some leaves the pits, some passes split1, etc.
Like I said in previous posting, those are moments a player can get spectated and that Lapper can do something.

There is an event executed when a player spectates:


#####################################
#Action on teleport to pit (Shift+P)#
#####################################

# Actions to execute when player spectates or disconnects (leaves race).

Event OnLeaveRace( $userName ) # Player event
# privMsg( GetCurrentPlayerVar("NickName" ) . "^8 left the race!" );
EndEvent

Alright i see what you're saying.
so lets try. When somebody gets spec'd for max car resets. I currently have that set to 5

Appreciate you working with me!

oh i apologize i didn't see that code you sent D:
Quote from carmaniac1993 :Alright i see what you're saying.
so lets try. When somebody gets spec'd for max car resets. I currently have that set to 5

Appreciate you working with me!

oh i apologize i didn't see that code you sent D:

There's also an event for when max car resets is reached:


Event OnMaxCarResets( $userName ) # Player event Spectate if player has used car reset more than the max
globalMsg( langEngine( "%{main_maxreset}%" , GetCurrentPlayerVar( "NickName" ) ) );
cmdLFS( "/spec " . GetCurrentPlayerVar( "UserName" ) );
EndEvent

As you can see in above code, a globalMsg (this means a message to be seen by everyone) is send and then the player who reached that limit, gets spectated.
There's also an option to send a message to the player who reached that limit, then you have to use privMsg
Using "langEngine" might be a little complitated when you first start coding, so forget about that for now and work with normal text.
-------------
Hello friends , sorry to trouble you , but why am I suffering serious problems with LFSLapper .

I have included a code that when a player passes near a cone wall tire ...... he gets extra points for drift . And this one appears Feedback chatting . example :

' The player Kobayashi kissed the wall , won 1500 points ! '

But the player spend in the area , the LFSLapper Restarts alone.

Please I beg for some help , please. Thank you for attention friends !

Kobayashi
Because lapper does not allow you to put something like

$DriftScore = $DriftScore + 100;

into a sub-routine. If you do, it restarts.
So , have any way to put this code , but without the extra points ? Feedback only appearing in the chat , the player scraped the wall ?
Then if I could add something to the lapper , when all players pass in a Zone , to appear in the chat then one Feedback congratulations or something ? (no punctuation drift just Feedback ! ) .

It is why in my drift server I do many events , this would help me a lot with the evaluation of players when passing Zones .

Has some way I can pay you guys stop modifying my lapper just to have this Feedback (Clipping Point ) ?

Thank you for attention !
Quote from Kobayashi.D :Then if I could add something to the lapper , when all players pass in a Zone , to appear in the chat then one Feedback congratulations or something ? (no punctuation drift just Feedback ! ) .

It is why in my drift server I do many events , this would help me a lot with the evaluation of players when passing Zones .

Has some way I can pay you guys stop modifying my lapper just to have this Feedback (Clipping Point ) ?

Thank you for attention !

It's fairly easy to add a zone (or more) into Lapper.
Look for this section of code:

###################################
#Event triggered when lapper start#
###################################

Then add this: RegisterZoneAction( "MyZone", "SO6" , 337 , SA_Test3, "" );

"MyZone" can be any text you want
"SO6" is the code of the track you want the ZoneAction to work on
337 is the digital code of the zone
SA_Test3 is the sub routine called when someone enters the zone
"" means that no sub routine is called when someone leaves the zone, this can be replaced by the name of another sub routine which is executed when the zone is left

To find the actual place of the zone, drive your car to the desired place and type !zone
In the chat you will be shown the digital code of that zone.

The thing you want, could be something like this:

RegisterZoneAction( "MyZone", "SO6" , 337 , SA_Test3, "" );

Sub SA_Test3() # Lapper Event
globalMsg( GetCurrentPlayerVar("NickName") . "has passed the zone" );
EndSub

This will display a message in chat, for every player that passes the zone.
Much, but thank you so much Yisc !

The LFSLapper no more restarts , it will only just one problem !

The Feedback on chat , this is not showing up = (

See the placement of codes is actually correct please? ^ _ ^


###################################
#Event triggered when lapper start#
###################################
Sub DisplaySpeed( $userName )
PrivMsg( langEngine( "%{main_speedtrap}%" , ToPlayerUnit( GetCurrentPlayerVar( "InstantSpeed" ) ),GetCurrentPlayerVar("UnitSpeed") ) );
EndSub
Sub ExitDisplaySpeed( $userName )
PrivMsg( "Exiting of displaySpeed" );
EndSub
Event OnLapperStart()
#RegisterScheduleAction( "0 0 0 * * * *", SA_mid );
#RegisterScheduleAction( "0 0 0 * 1 1 *", SA_newyear );

#RegisterNodeAction( "BL1" , 140 , DisplaySpeed,ExitDisplaySpeed );
#RegisterNodeAction( "BL1R" , 245 , DisplaySpeed,ExitDisplaySpeed );
#RegisterZoneAction( "BL1" , -60,106, 5 , DisplaySpeed,ExitDisplaySpeed );
RegisterZoneAction( "AU1" , 22,-773, 1 , SA_ConeScrape1,"" );

EndEvent

Sub SA_ConeScrape1() # Lapper Event

globalMsg( GetCurrentPlayerVar("NickName") . "has passed the zone" );

EndSub

Sub SA_mid() # Lapper Event

globalRcm( langEngine( "%{main_midnight}%" ) );

EndSub

Sub SA_newyear() # Lapper Event

globalRcm( langEngine( "%{main_newyear}%" ) );

EndSub

Event OnButtonFunction($userName, $SubT) # Player Event When Player push shift+I or Shift+B
# DEBUG ("Button SubT for " . $userName . " is " . $SubT);
EndEvent
It's because you want it to be a player event rather than a lapper event. Try

Sub SA_ConeScrape1($userName) # Player Event
globalMsg( GetCurrentPlayerVar("NickName") . "has passed the zone" );
EndSub

In this case, the difference between lapper event and player event is;

Sub SA_ConeScrape1() # Lapper Event
Sub SA_ConeScrape1($userName) # Player Event

As you can see, the Player Event has $userName between the brackets.

For info: wherever you see a # symbol on a line, this tells lapper to ignore anything after it on the same line.

Sub Header bracket use is something I still find hard to get my head round, even after asking the question, and Krayy (lapper programming expert) providing a very detailed answer (Q&A HERE).
Beautiful, beautiful , beautiful.

Thank you friends for the patience , now the code worked. how can I repay such gratitude and patience of you ? You guys are very humble ! Thank you continue like that you guys will conquer the world ! ^ _ ^

Now I can only placement points to spend in the area .

Many thanks and Yisc Sinanju ! You are thousand note * _ *
1

FGED GREDG RDFGDR GSFDG