The online racing simulator
At the moment, I've got the original "Top 200 Drift Score' button linked with a CatchEvent OnLeaveRace( $userName ).

You could change OnLeaveRace to OnNewPlayerJoin. You may also have to remove the CatchEvent OnNewPlayerJoin( $userName ) section at the bottom of the file.

You could also amend this code slightly and link it to your Click for Drift Scores button by substituting your existing sub-routine for the following sub-routine;

DriftClick_Start

See how you get on.
Quote from paul88 :I am new to LFS Lapper and would like some help
i have placed ip / insim in LFS Server file
DEF1|^0Launch ^1Racing|213.229.77.230|50001|./default|default_1.ini|autoStart
i have put admin password in .ini file
when i start it goes into standby state when i type !start in chat window it puts it back in standby state and says in lapper window err

2/10/2012 11:05:49 PM
Lapper Instance 213.229.77.230/50001 abort!
Object reference not set to an instance of an object.
LFSLapper
at InSim.CodePage.GetString(Byte[] pack, Int32 offset, Int32 len) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\Commun\CodePage.cs:line 176
at InSim.Decoder.pakGetString(Byte[] pak, Int32 first, Int32 len) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\InSim4.cs:line 781
at InSim.Decoder.VER..ctor(Byte[] packet) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\InSim4.cs:line 835
at InSim.Connect.insimConnectTCP(String host, Int32 port, String adminPassword, String mode, String nameApp, Boolean isLocal) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\InSim4.cs:line 310
at InSim.Connect.insimConnect(String host, Int32 port, String adminPassword, String mode, String nameApp, Boolean isLocal, Boolean TCPmode) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\InSim4.cs:line 255
at LFSLapper.LFSListen.Listen.openStbMode() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\LFSListen\Listen.cs:line 98
at LFSLapper.LFSListen.Listen.startStbMode() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\LFSListen\Listen.cs:line 197
at LFSLapper.LFSListen.Listen.start() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\src\LFSListen\Listen.cs:line 153
System.String GetString(Byte[], Int32, Int32)
Closing Instance...

please help
thanks

Why dont you try the new LFSlapper version 6 ?
Sin,

Your driftmenu is awesome, is working like a charm . I have a question about the list. I want to show only 1 drift score for an account.

ex:

XRT [KBD]SarXes 8200
FZ5 [KBD]SarXes 9200
LX6 [KBD]SarXes 10120

So I have 3 drift score but I want to show only the best with LX6 so if I drift a better score with XRG overwrite the score and shows only the XRG . Im so bored if a new player drift with 6 scars and show only his name ... So with this shows only his best score ....
thanks
thanks lfslapper 6 works ok

now where do i find how to make lapper give drivers a license

and how do i make lapper host a race event so drivers have to register to join and only registed drivers get on the server at the race event time ??

:-) hope this makes sence
Quote from sarxes : ...I want to show only 1 drift score for an account....

I've been unable to find a way of getting anything but !drf and a number (e.g. !drf 20) to work - can't even get !drf RB4 to work.

I would have thought !drf would work same way as !top, but it doesn't - unless anyone else knows a way?
Quote from paul88 :thanks lfslapper 6 works ok

now where do i find how to make lapper give drivers a license

and how do i make lapper host a race event so drivers have to register to join and only registed drivers get on the server at the race event time ??

:-) hope this makes sence

Have a look at Krayy's CIF system HERE for admin to see if it helps.
Quote from sinanju :I've been unable to find a way of getting anything but !drf and a number (e.g. !drf 20) to work - can't even get !drf RB4 to work.

I would have thought !drf would work same way as !top, but it doesn't - unless anyone else knows a way?

I looked inside in DriftPB and GripPB and also are "same" just I dont know which is the command line that allow to limit the score just for one car ... But if there isnt any code no problem. And one question how should I remove the OK button from buttom of the list because i rewrited your code a bit and there is a Close Drift Score button and I dont need the OK button
wow
right im getting somewhere now thanks for all help

next how do i turn off drift as we race server not drift and how do you turn off friendly rank ????

thanks

drift sorted just how do turn off friendly rank
Quote from paul88 :right im getting somewhere now thanks for all help

next how do i turn off drift as we race server not drift and how do you turn off friendly rank ????

thanks

Find Drifting options section and change to mine


<?php 
##################
#Drifting options#
##################
# This is the filepath for a file containing the collected data.
# This file will be created if it doesnt exist yet.
# You must ensure read/write access to this path.
#-------------------------------------------------------------------
/*

$DriftDatabase = "./DriftPB";
$MinimumDriftSpeed = 50; # Minimum speed in km/h to maintain. Driving below that speed will reset score
$MinimumDriftAngle = 15; # Minimum angel to maintain. When angle is below value, score is reset
$MaximumDriftAngle = 130; # Maximum angel to maintain. When angle is above value, score is reset

# Actions to do on new personal best drift lap.
Event OnDriftPB( $userName ) # Player event

EndEvent

# Actions to do to when total lap drift score is higher or equal to MinimumDriftScore.
Event OnDriftLap( $userName ) # Player event

EndEvent
Event OnDriftScore( $userName ) # Player event

EndEvent

$GoodDriftScore = 4000; # Value to be reached to execute action on good drift score
Event OnGoodDrift( $userName ) # Player event

EndEvent

$MinimumDriftScore = 1000; # Minimum drift score required

# Actions to do at end of lap if MinimumDriftScore is not achieved.
Event OnDriftTooLow( $userName ) # Player event

EndEvent

# Actions to do when drift score is resette to zero when to low speed.

Event OnDriftResetScore( $userName ) # Player event

EndEvent
*/
?>

For friendly rank is


<?php 
privRcm
(  langEngine"%{main_onnewpb_rank2}%" ,GetCurrentPlayerVar("Car"),GetCurrentPlayerVar("PosAbs") ) );
?>

and put " # " before privRcm withour quote marks like me


<?php 
#privRcm(  langEngine( "%{main_onnewpb_rank2}%" ,GetCurrentPlayerVar("Car"),GetCurrentPlayerVar("PosAbs") ) );
?>

thanks
dont that seems to work ok

i added my lfs user name in admin file but when on server and i type !admins or !event nothing am i doing somthing wrong ??
Quote from paul88 :how do turn off friendly rank

If you're talking about the part of the welcome message when you join the server, then it's part of the lfslapper.lpr code.

Look for a line that has main_welc2 in it (probably starts openPrivButton( "pos",) - you can delete, amend or put # mark in front of it.
Quote from paul88 :dont that seems to work ok

i added my lfs user name in admin file but when on server and i type !admins or !event nothing am i doing somthing wrong ??

Idk what is the problem but its doesnt work for me too ...
$DefaultTopCar in Lapper 5.846
I have a question about $DefaultTopCar.
In my main Lapper script that value is set to XFG.
Then it gets changed by a registered action, which makes a call to another Lapper script in which I put a new value into $DefaultTopCar
When I do a writeline($DefaultTopCar) the correct value is displayed, but when I do !top, I still get a list for the XFG, as if the value wasn't changed.
Clearly there is something that I'm missing, but I can't figure out what.

As mentioned in the title, I'm using Lapper 5.846

[edit]
I think I've found the answer to my question, the abilty to set a value to that variable was introduced in version 5.847. So I need to upgrade to a higher version of Lapper
[/edit]
SetStoredValue in Lapper 6.0.1.2
Right, I took the bull by the horns and plunched into the latest Lapper version.
Of course a lot to re-discover / learn, but I'm sure that will come along the way.
First thing I really can't figure out, is a time-out I get when saving a serious list of values into the database.

The error I get is:

2/12/2012 8:29:40 PM -> Syntax error in cfg file "./schedule_set.lpr" at line #1671
Time Out in Event or Sub 2000 ms
Function 'schedule_save' script aborted

I need to save 98 values into the database but it already stops after 15 of them.
Any help would be appreciated.

[edit]And found the answer to this myself again. Turned out it is a configurable value in LFSServers.cfg , raised the timeOutScript value to 10000[/edit]
Pfew, a lot of things have changed with Lapper over the last 1,5 years.
I've just discoverd the CIF-modules which look very nice.
But the current download seems to be outdated and some buttons aren't working.

Would it be possible to post a new download for Lapper with all the current modules etc. in place, so you don't have to dig through all those threads to get what you needed, only to find out some things are still missing?
Hy Sin,

My new question is attached on the imaged
Attached images
removetheokbutton.png
The 'Ok' buttons at the bottom of the !top and !drf tables are built into lapper so no way off removing as far as I'm aware.
Quote from sinanju :The 'Ok' buttons at the bottom of the !top and !drf tables are built into lapper so no way off removing as far as I'm aware.

But I DONT need :'( because the Close Drift Score close all but the ok is only the list and the buttons abouve remain there...
hi

i was busy with the OnDriftScore($userName) event
and i have add the following lines:

IF (GetCurrentPlayerVar("LastDriftScore") > GetCurrentPlayerVar( "BestDScore" ))
THEN
SetCurrentPlayerVar( "BestDScore", GetCurrentPlayerVar("LastDriftScore"));
openPrivButton( "6b",11,141,9,6,1,-1,0,"^7" . GetCurrentPlayerVar( "BestDScore" ));
ELSE
privMsg("^1#(Debug) Score is to low");
ENDIF

but sometimes these lines wont work when the currentdriftscore is higher than the Bestscore. it just give the message "score is to low";

the rest like: angle , currentdriftscore,speed etc is working well.

is lapper to slow to get the variables?? and is there a solution to fix it??
Have you tried to output the values to see if they are correct?

Try that with writeline to display them on the Lapper console, or privMsg to display them in LFS chat.
I made a check before it set the new best driftscore and after setting the new best driftscore. see the code below.


privMsg("^3#^7(1)BestDriftVariable: ". GetCurrentPlayerVar( "BestDScore" ));
privMsg("^3#^7(1)CurrentDrift: ". GetCurrentPlayerVar("LastDriftScore"));
IF (GetCurrentPlayerVar("LastDriftScore") > GetCurrentPlayerVar( "BestDScore" ))
THEN
SetCurrentPlayerVar( "BestDScore", GetCurrentPlayerVar("LastDriftScore"));
openPrivButton( "6b",11,141,9,6,1,-1,0,"^7" . GetCurrentPlayerVar( "BestDScore" ));
ENDIF
privMsg("^3#^7(2)BestDriftVariable: ". GetCurrentPlayerVar( "BestDScore" ));
privMsg("^3#^7(2)CurrentDrift: ". GetCurrentPlayerVar("LastDriftScore"));

and the result is: (see pics)

(1) = before set
(2) = after
Attached images
good.png
bad.png
So in the second run it doesn't recognise that 125 is bigger then 97.
You could try to force these values to be numbers by using: ToNum( expression )
it seems to be working.

i have tried this before but it didnt work
now i have to make a new variable;

$CurrentDrift = GetCurrentPlayerVar("LastDriftScore")
$BestDScore = ToNum(GetCurrentPlayerVar( "BestDScore" ));

IF ($CurrentDrift > $BestDScore)THEN
BLBLALBA
ENDIF

Thank u
Is it possible to have a button appear for less than one second, or does time need to be an integer?

I've tried things like 0.5 and ToNum( 0.5) and also $RTime = round( RandomNum( 0.4,0.6 ),1);, but all throw up an error.
Quote from sinanju :Is it possible to have a button appear for less than one second, or does time need to be an integer?

I've tried things like 0.5 and ToNum( 0.5) and also $RTime = round( RandomNum( 0.4,0.6 ),1);, but all throw up an error.

The button code always expects a whole number so unfortunately there is no way to "flash" a button for less than a second.
This thread is closed

Config help
(1112 posts, closed, started )
FGED GREDG RDFGDR GSFDG