The online racing simulator
Hmmm ...
I made this


Sub RestisterZoneAction

RegisterZoneAction( "AU1" ,-33,-748, SR_Idle,"" );
RegisterZoneAction( "AU1" ,-33,-751, SR_Idle,"" );
RegisterZoneAction( "AU1" ,-33,-754, SR_Idle,"" );
RegisterZoneAction( "AU1" ,-32,-757, SR_Idle,"" );

EndEvent

Sub SR_Idle()
$OnIdleTimeout1 = 998;
$OnIdleTimeout2 = 999;

EndSub


Its good ?
Not good as you don't need RegisterZoneAction as a sub-routine - where do you call the routine from?

It's already part of an event - Event OnLapperStart().

Just add your RegisterZoneAction's into the existing list of other Register Actions (Schedule, Node and Zone).

Normally, instead of something like

RegisterZoneAction( "AU1" ,-33,-748, SR_Idle,"" );

which you have, you would have something like

RegisterZoneAction( "AU1" ,-33,-748, 3, SR_Idle,"" );

Can't find what the additional number (in this case, 3) is for, but I think it defines the size of the zone.
There is any way to set the driftmeter to start pointing from the first chekpoint and finish with the finish point and how can I change the colour of the drift meter windows ?. All is good now ... I'll have some questions but now is enough this.
ThX sinanju u r the best !
Quote from sarxes :There is any way to set the driftmeter to start pointing from the first chekpoint

Probably not without a re-write of the code or something like deleting any points when reaching first split. Something like


<?php 
CatchEvent OnSplit1
$userName # Player event
    
IF ( $DriftScore )
    
THEN
        $DriftScore
=0
    
ENDIF

    IF ( 
$LastDriftScore )
    
THEN
        $LastDriftScore
=0
    
ENDIF

EndCatchEvent
?>


To add this to the driftmeter.lpr file, copy all above code.

Open the driftmeter.lpr file and search for line that starts

CatchEvent OnGoodDrift

Paste the already copied code into the driftmeter.lpr file and then save file.

Quote from sarxes :...and finish with the finish point

Drifting score finishes at end of a lap - so will stop at the finish point in a layout.

Quote from sarxes :and how can I change the colour of the drift meter windows ?

You can only choose between clear background, light grey background or dark background.

(you can play around with one coloured background on another to give slight difference, like dark on dark will give almost black background).

If you're looking for green, white, red, blue, purple, etc., background then I suggest you look for my circular driftmeter code as that was the only way I could get proper coloured buttons to work. See attached image. Code HERE.

If you want to change the light and dark grey backgrounds in the normal driftmeter then look for the following code


<?php 
    openPrivButton
"driftboxback",5,137,22,35,4,-1,32," ");
    
openPrivButton"driftanglebox",6,146,10,20,4,-1,32," ");
    
openPrivButton"driftcombbox",16,146,10,10,3,-1,32," ");
    
openPrivButton"driftscorebox",16,156,10,10,3,-1,32," ");
?>

The number 32 at the end of the code refers to the background - you can have the following 3 choices

0 - transparent button
16 - light button
32 - dark button
Attached images
circular drift meter.png
I wanted to make a text which in 5 or 10 minutes show for players but I cant do working !

Event OnLapperStart()
RegisterScheduleAction( "0 5 0 * * * *", SA_mid );
# RegisterScheduleAction( "0 0 0 * * * *", SA_newyear );

I changed the value for 5 minutes but its doesn't working ...

In lang EN I found this

main_midnight = "^1Like : www.facebook.com/LFSkeyboarddrifters!";

Instead of main_midnight shouldn't be SA_mid ??? I cant understand the relation between main and SA ... You could help me in this ?

I'd like to know how could I do that after a lap what is my Rank in the list of players in the server .... So after every lap done I want to see the message: "You are 2nd in the top list in this server". ... ! Is this possible ?



P.S. :

After adding the line what u pasted in php code i have the following error ....

Lapper Instance abort, Go in standBy mode. Look at log file :./default/logs/127.
0.0.1-29999-ERR.log
Quote from sarxes :I wanted to make a text which in 5 or 10 minutes show for players but I cant do working !

Event OnLapperStart()
RegisterScheduleAction( "0 5 0 * * * *", SA_mid );
# RegisterScheduleAction( "0 0 0 * * * *", SA_newyear );

I changed the value for 5 minutes but its doesn't working ...

In lang EN I found this

main_midnight = "^1Like : www.facebook.com/LFSkeyboarddrifters!";

Instead of main_midnight shouldn't be SA_mid ??? I cant understand the relation between main and SA ... You could help me in this ?

SA_mid is the sub-routine for the Schedule Action, but main_midnight is the language file (if you continued your search, you would have found main_midnight = "Minuit, attention aux travailleurs!"; in the French language section, etc).

Best to make your own RegisterScheduleAction along with a sub-routine.

E.g.


<?php 
RegisterScheduleAction
"0 05 0 * * * *"SA_facebook );
?>

then sub-routine


<?php 
Sub SA_facebook
()
    
globalRcmlangEngine"%{main_facebook}%" ) );
EndSub
?>


(Sub-routine goes after the line EndEvent).

A globalRCM will put large message in middle of screen, which everyone will see. If you don't want message in middle of screen, try changing globalRCM to globalMsg.

Then in the Lang "EN" section

<?php 
main_facebook 
"^1Like : www.facebook.com/LFSkeyboarddrifters!";
?>

Quote from sarxes :After adding the line what u pasted in php code i have the following error ....

Lapper Instance abort, Go in standBy mode. Look at log file :./default/logs/127.
0.0.1-29999-ERR.log

Whoops! Silly me!

Last line should be EndCatchEvent (NOT CatchEndEvent)!!
Quote from sarxes :

I'd like to know how can I do that after a lap what is my Rank in the list of players in the server .... So after every lap done I want to see the message: "You are 2nd in the top list in this server". ... ! Is this possible ?

So when every player finish a lap show the big message like in PB message. So show the friendly rank after every lap like the PB message and other players to each other rank in global message...


I can do this ?

P.S. : The scheduled message doesnt work ... :/ Its doesn't show nothing ...
Player ranking - this can be done with the $Posabs variable (see HERE to show how it works).

RegisterScheduleAction - try

RegisterScheduleAction( "0 10 * * * * *", SA_facebook );

(I assume you've put in the sub-routine and the language line).
Quote from sarxes :I'd like to know how could I do that after a lap what is my Rank in the list of players in the server .... So after every lap done I want to see the message: "You are 2nd in the top list in this server". ... ! Is this possible ?

Try something like;

Look in your LFSlapper.lpr file for the line
Event OnLap( $userName ) # Player event

Then after that line (and before the EndEvent line), add

globalRcm( langEngine( "%{main_toplisting}%",GetCurrentPlayerVar("PosAbs")));

which would show everyone the message, or if you only wanted to show player who completed lap, then use this line

privRcm( langEngine( "%{main_toplisting}%",GetCurrentPlayerVar("PosAbs")));

You would need to add following line into the Lang "EN" section

main_toplisting = "^7You are currently ^1{0} ^7in the top list on this server";

Hello!
There's 18 rows in lapper's !top table by default. Can it be expanded by some way?
Thanks.
!top and !drf cannot be expanded at the moment to show more than the top 18 times/points on the server combo.

I've got my server to show a set of buttons so you can find more !top details by mouse clicking rather than trying to remember correct command.
Attached images
LFS Top.png
Thanks, sinanju! I do not have such a thing. Is it tricky to make?
It's already part of a menu structure code that I released - look HERE.

Top times are under 'User Switchboard'.

Nothing to stop you just taking the relevant pieces of code and pasting into your LFSLapper.lpr config file (if you feel confident enough about what you're doing).
Thanks a lot sinanju! You're genius! It now looks a way much better.
Maybe I could change the PosAbs to position in drift list . You know the rank in !drf table instead the hotlap


After adding the facebook line all is working but it shows only 2 times and over.

I attached the error what gives the dedi server
Attached images
error.jpg
Quote from sarxes :Maybe I could change the PosAbs to position in drift list . You know the rank in !drf table instead the hotlap

Using PBDrift instead of PosAbs (!drf instead of !top) is probably best you can do, but this will only show your personal best points - not where you stand in the table compared to others.

To to this, instead of the line

globalRcm( langEngine( "%{main_toplisting}%",GetCurrentPlayerVar("PosAbs")));

try

globalRcm( langEngine( "%{main_toplisting}%",GetCurrentPlayerVar("PBDrift")));

Likely you'll also have to change the 'main_toplisting' text part of the code, as it will not quite make sense if using drift scores.
Quote from sinanju :Using PBDrift instead of PosAbs (!drf instead of !top) is probably best you can do, but this will only show your personal best points - not where you stand in the table compared to others.

To to this, instead of the line

globalRcm( langEngine( "%{main_toplisting}%",GetCurrentPlayerVar("PosAbs")));

try

globalRcm( langEngine( "%{main_toplisting}%",GetCurrentPlayerVar("PBDrift")));

Likely you'll also have to change the 'main_toplisting' text part of the code, as it will not quite make sense if using drift scores.

Okay but you can make working to show the position in drift list not the points ?



P.S. : I have an error id_mainongoodrfit ! I attached the error screen
Attached images
lost control.png
Quote from sarxes :Okay but you can make working to show the position in drift list not the points ?

I haven't been able to do that, and I'm not sure it's possible.

What does globalRcm( langEngine( "%{main_toplisting}%",GetCurrentPlayerVar("PBDrift"))); get you?


Quote from sarxes :I have an error id_mainongoodrfit ! I attached the error screen

Search the driftmeter.lpr file for main_ongooddrift and change to driftmeter_ongooddrift.

This has been flagged before, but not yet changed in LFSLapper zip download.
Forget about the Drifting top list ... My new question is how could I do that on practice ex: on AU1 and the track have finish line show the drifting score. Because it only shows when the laps enabled if /laps 1 or 10 the drifscore is showed but if not there is nothing happening. ... All about this the Lapper is working very good and you are the best !!!

P.S. : You run a server ? whats the server name ?
Quote from sarxes :My new question is how could I do that on practice ex: on AU1 and the track have finish line show the drifting score. Because it only shows when the laps enabled if /laps 1 or 10 the drifscore is showed but if not there is nothing happening

Why not set the laps on your layout?

Quote from sarxes :P.S. : You run a server ? whats the server name ?

Sin'rs (Top Gear)
Because when someone enter the server he is putted in the middle of the track not in pit ...

P.S. I saw your logo at left corner I can add a same too or its copyrighted ?
What means IS_MTC couldn't not find destination ?
Quote from sarxes : I saw your logo at left corner I can add a same too or its copyrighted ?

Look in your LFSLapper.lpr file for the Event OnNewPlayerJoin( $userName ) section.

Add the following 2 lines;


<?php 
    openPrivButton
"label_lfslogo",5,181,21,4,1,-1,128,langEngine"%{label_lfslogo}%" ));
    
openPrivButton"label_logo",4,170,24,14,1,-1,128,langEngine"%{label_logo}%" ));
?>

These must be added before the EndEvent line.

In the Lang "EN" section, add the following 2 lines;

<?php 
label_logo 
"^1Sin'rs";
label_lfslogo "^7powered by ^3LFSLapper";
?>

Where I have "Sin'rs", you can put your own Server Name.
THX for Logo !!!!!!!!

I searched a lot for the argument for displaying the rank on the Drift table instead of the best lap ... What would be ?

I think something similiar with

<?php 
$Posabs 
GetCurrentPlayerVar("PosAbs");
?>

. How could I extract the !drf table position instead ot !top position ???
Unfortunately, there's nothing like that.

Couple of things you could try, are;


<?php 
$PBDrift 
GetCurrentPlayerVar("PBDrift");
?>


but this will only show current Drift PB on current car/track combo, not where you are in relation to the top of the drift charts

or

write a sub-routine connected to a button or an event, that would show


<?php 
Sub SR_drfnear
$KeyFlags,$id )
    
$NickName GetCurrentPlayerVar("NickName");
    
drfNear$NickName );
EndSub
?>


Basically, this will just show up exactly same as if driver typed !drfnear; just it would save having to remember the correct command.
This thread is closed

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