The online racing simulator
Searching in All forums
(968 results)
Gai-Luron
S3 licensed
Work in progress , be patient

www.lfs-lapper.org/help/en
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
I think 16 bit stuff are in sqlite dll and i don't change anything int it

For Lapper is writen only with C#
Gai-Luron
S3 licensed
Do you have a 64bit system, if yes try to run in 32bit
Gai-Luron
S3 licensed
now version is 5.9 and it's available
Gai-Luron
S3 licensed
Old config file are not compatible. You have a quick start here for the new version. Some file must be setted

http://www.lfs-lapper.org/help/en/quick_start.htm

Edit:
ooh it's in french, i change it tonite. I have a problem with my help writer
Gai-Luron
S3 licensed
Hello, i change nothing in your lpr file, just catchEvent . Maybe i have take an old version, not terminated, or bad cut and paste by me.

I take a look tonight to correct this error, but if you have this file corrected, put an attachment, i get it and i install in next release

Gai-Luron
Gai-Luron
S3 licensed
Ouuuuppssss version Max 5.6

i developpe it 60 years ago .

Tim this is a code for an event, very simple
StopGoPenaltyAction = /msg {Nickname}^1 Kick to fast drive on pit|/rcm ^1WARNING-BAN POSSIBLE|/rcm_ply {Username}|/kick {Username};

now

Event OnMaxFastDriveOnPit( $userName ) # Player event
globalMsg( langEngine( "%{main_maxfastdrivepit1}%",GetCurrentPlayerVar("NickName") ) );
privRcm( langEngine( "%{main_maxfastdrivepit2}%" ) );
cmdLFS( "/kick " . GetCurrentPlayerVar("UserName") );
EndEvent

What is the code more easy to read?


Seriously, try to update to newer LFSLapper, it's more powerfull and have button

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed

<?php 
$Refund
[1] = 13200;
$Refund[2] = 26400;
$Refund[3] = 39600;
$Refund[4] = 52800;
$Refund[5] = 66000;
?>


<?php 
IF( GetCurrentPlayerVar("TotDistMeter") >= $RefundGetCurrentPlayerVar("Refund") ] )
THEN
    SetCurrentPlayerVar
("Refund"ToNumGetCurrentPlayerVar("Refund") +  ) );  
    
globalMsg"^7" $userName " Recived $2500 ^1Reason: ^7Distance bonus" );
    
SetCurrentPlayerVar"Cash"ToNumGetCurrentPlayerVar"Cash" ) + 2500 ) );           
ENDIF
?>

Or


<?php 
$Refund 
13200;
?>


<?php 
IF( GetCurrentPlayerVar("TotDistMeter") >= ToNum$Refund GetCurrentPlayerVar("Refund") ) )
THEN
    SetCurrentPlayerVar
("Refund"ToNumGetCurrentPlayerVar("Refund") +  ) );  
    
globalMsg"^7" $userName " Recived $2500 ^1Reason: ^7Distance bonus" );
    
SetCurrentPlayerVar"Cash"ToNumGetCurrentPlayerVar"Cash" ) + 2500 ) );           
ENDIF
?>

Don't forget to initialize SetCurrentPlayerVar("Refund", 1 ) ); on player connection


Don't forgot to use WriteLine to trace your code in console. WriteLine display a message in console screen
For debugging code is usefull. When your code is good remove lines

example:

<?php 
WriteLine
GetCurrentPlayerVar("UserName") . ":" GetCurrentPlayerVar("TotDistMeter") );
IF( 
GetCurrentPlayerVar("TotDistMeter") >= ToNum$Refund GetCurrentPlayerVar("Refund") ) )
THEN
    WriteLine
GetCurrentPlayerVar("UserName") . ": Refunded with $2500" );
    
SetCurrentPlayerVar("Refund"ToNumGetCurrentPlayerVar("Refund") +  ) );  
    
globalMsg"^7" $userName " Recived $2500 ^1Reason: ^7Distance bonus" );
    
SetCurrentPlayerVar"Cash"ToNumGetCurrentPlayerVar"Cash" ) + 2500 ) );           
ENDIF

?>

Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

Use a delayed command to display fastest lap later.

Perhaps 2 minutes after the arrival of the first to leave time for other drivers to finish.

Gai-Luron
Gai-Luron
S3 licensed
To late, already fixed , take release 5.9.1.5
Gai-Luron
S3 licensed
Release 5.9.1.4 available for test purpose.

send me feedback.

+-------------------------------+
|Changes from v5.914 to 5.915 |
+-------------------------------+
Files to replace From the previous version
LFSLapper.exe

1. Fix error on storedvalue on migration from 5.8

2. Add players Vars
PBDrift to have the drift PB on the current combo

Gai-Luron
S3 licensed
What is it?

I do nothing on stored dbs in 9.1.4

can you send me your dbs the 5.8

it's not normal

Gai-Luron


Edit:
Arghhhhhhh, enormous bug on migration!!!
i fix it soon
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
drew_welc2 = "^7Your best drift score: {0} &Don't act the fool&Respect your fellow drifters";

langEngine("%{drew_welc2}%",$bestDriftScore )
replace {0} with content of$bestDriftScore

Another example with 2 argument to langEngine

drew_welc3 = = "^7Hello {0} Welcome on {1}";

langEngine("%{drew_welc3 }%",$uname,"My Server Name" )

replace {0} with content of $uname
replace {1} with "My Server Name" ( without quote )

All identifier precede wth $ is variable

$uname is a variable that can contains text or numeric value
To set it use this syntax

$uname = "My var contain this text";
in this case $uname contains "My var contain this text";

$uname = GetCurrentPlayerVar( "UserName");
in this case $uname contains the player userName, "Gai-Luron" if it's me who connect to your server and trigger the event onConnect.

Gai-Luron


PS : For now you haven't access to the driftPb, i put it in next release
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
drew_welc2 = "^7Your best drift score: {0} &Don't act the fool&Respect your fellow drifters";

openPrivButton( "pos",25,80,150,10,8,-1,32,langEngine("%{drew_welc2}%",$bestDrifScore ) );

{0} is replaced by the first arg in langengine
{1} is replaced by the second arg in langengine
and so on

Dont forget to assign $bestDrifScore with the GetCurrentPlayerVar containing the best drift score.that's all

look at other langengine in default file to better understand how it work
Gai-Luron
S3 licensed
Hello,

I see your previous post about this feature. I try to put in LFSLapper but there is a problem to do that. In fact LFS send packet every 1/10 of second, but the distance that vehicle have done is wrong for this unit of time and by extension the speed is wrong. But near to true for 5 time unit (average speed).

In fact this is due to packet latency or lag

If i use this 1/10 of second unit, speed can climb up to 200km/h in one packet and 20km/h in next. The real speed is near 110 when i use more then 4 packet.

The GPS value can be correct every second, no under this value

there is a possibility if i make average of the 5 previous dist making a glissando for one step unit.
Example
avg of packets ( 1 2 3 4 5 )
then avg of packets ( 2 3 4 5 6 )
then avg of packets ( 3 4 5 6 7 )

i try if i can do that , if this can be done, the GPS speed is late about 500 millisecond relative to real speed

i hope you understand what i say

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Automatic done relative to choice in !myconfig for each player

Script present in LFSLapper.lpr file is also relative to that choice
Gai-Luron
S3 licensed
Take a look in err file.
Gai-Luron
S3 licensed
Event OnSplit1() # Player event

it is that i say previously

now

Event OnSplit1( $userName ) # Player event

Don't change line containing word Event in LFSLapper.lpr 5.9.1.4 file, paste your code inside Event... EndEvent


This line is wrong, forgot IF and double ); ); at end
Quote :openPrivButton( "split01",50,5,100,10,8,3,32, . "^1Split 01:^7 " . GetCurrentPlayerVar("DriftScore") . " ^1pts" ); );
ENDIF

maybe a bad copy paste from your LFSLapper file to your post
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

You can copy and paste that is inside events, not the line Event yourEvent ( ), because in 5.9 Player Event have a new parameter $userName ( you don't have to use it if you want ).

Also take a look at your code because var are case sensitive now

GetCurrentPlayerVar( "username" ) not same as GetCurrentPlayerVar( "UserName" )

Take a look at varslapper.txt in doc folder for complete list of builtin var for player

5.9 it's very similar to 5.8, the big difference is that player event receive the username of the player who triggered this event, that's all. the rest catchevent and catchsub are a new feature, not obligation to use it, but recommended to have clean script.

5.8 no more developped, no maintained, no upgrade


Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
To have all player var available take a look at file playerVars.txt in doc folder. i don't know if this file exist in your release. But in 5.9 you can refer to it to know all player var

Gai-Luron
Gai-Luron
S3 licensed
Hello,

Array are also present in your 5.8 version . in last version i optimize array, no add

All feature of the 5.9 version are the same than the older, except catchevent and catchsub.

When you use a catchEvent is like using the event.

example

LFSLapper.lpr

Event OnGoodDrift( $userName ) # This is present in main lpr file LFSLapper.lpr
....
CatchEvent

driftMeter.lpr
CatchEvent OnGoodDrift( $userName ) # This can be present in your script
closePrivButton( "driftcomboboxtexttopmessage0&driftcomboboxtexttopmessage&driftcomboboxtexttopmessage1" );
globalMsg( langEngine( "%{main_ongooddrift}%" ,GetCurrentPlayerVar("NickName"),GetCurrentPlayerVar("LastDriftScore") ) );
openPrivButton( "driftcomboboxtexttopmessage2",85,19,30,5,3,8,16,langEngine( "%{driftmeter_driftcomboboxtexttopmessage2}%") );

EndCatchEvent

anotherfile.lpr
CatchEvent OnGoodDrift( $userName ) # This can be present in other script
....
EndCatchEvent


First LFSLapper do the Event OnGoodDrift and then execute all catchEvent with the name OnGoodDrift

With that you haven't to modify LFSLapper.lpr to add your code, just add a catchEvent on the event that driftmeter need. In fact you release only one .lpr file. User include your script file using include in addonsused.lpr file and your script is added and work. No modification complicated need in main lpr file

Example in addonsused.lpr

#### Include for drifting infos ####
#include( "./driftdef.lpr");
# OR
#include( "./driftmeter.lpr");
#####################################

just remove # before include( "./driftmeter.lpr"); to have your driftmeter working
or remove # before include( "./driftdef.lpr"); to have default drift feature, no need to remove /* or */ arround code in LFSLapper.lpr

The big difference in the 5.9 is username passed to all player event and optimization ( more speed ) for the GLScript.

Take a look at your updated driftmeter script and you understand how work catchevent. ( very easy )

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
In last version driftmeter is by default in LFSLapper ( with catchevent ). Remove # into addonsused.lpr before driftmeter line to have this feature , that's all

all code is in driftmeter.lpr

no modification to do in default config file

Why do you continue to use obsolete LFSlapper version?
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
under construction
Gai-Luron
S3 licensed
Version 5.9.1.4 is released as standard version. Please migrate your old LFSLapper to this version.

Gai-Luron

I stop dev for a while ( only if fix bug need ), i starts writing manual at

http://www.lfs-lapper.org/help/ ( in french up to date )
http://www.lfs-lapper.org/help/en/ ( in english )

Gai-Luron
Gai-Luron
S3 licensed
you seem to have a 5.8 version of LFSLapper. What is your previous LFSLapper install? more change in configs files between 5.8 and 5.9. Start with a freshen release 5.9.1.3 and change the exe to 5.9.1.4

Gai-Luron
FGED GREDG RDFGDR GSFDG