View Full Version : Config help
sarxes
30th November 2011, 13:01
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 ?
sinanju
30th November 2011, 19:39
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.
sarxes
2nd December 2011, 14:32
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 !
sinanju
2nd December 2011, 16:38
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
CatchEvent OnSplit1( $userName ) # Player event
IF ( $DriftScore > 0 )
THEN
$DriftScore=0
ENDIF
IF ( $LastDriftScore > 0 )
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.
...and finish with the finish point
Drifting score finishes at end of a lap - so will stop at the finish point in a layout.
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 (http://www.lfsforum.net/showthread.php?t=66124).
If you want to change the light and dark grey backgrounds in the normal driftmeter then look for the following code
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
sarxes
2nd December 2011, 18:01
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
sinanju
2nd December 2011, 18:42
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.
RegisterScheduleAction( "0 05 0 * * * *", SA_facebook );
then sub-routine
Sub SA_facebook()
globalRcm( langEngine( "%{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
main_facebook = "^1Like : www.facebook.com/LFSkeyboarddrifters!";
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)!!
sarxes
3rd December 2011, 10:36
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 ...
sinanju
4th December 2011, 01:35
Player ranking - this can be done with the $Posabs variable (see HERE (http://www.lfsforum.net/showthread.php?p=1553512#post1553512)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).
sinanju
4th December 2011, 13:43
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 eventThen 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";
Vaneo
5th December 2011, 15:36
Hello!
There's 18 rows in lapper's !top table by default. Can it be expanded by some way?
Thanks.
sinanju
5th December 2011, 16:21
!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.
Vaneo
6th December 2011, 10:47
Thanks, sinanju! I do not have such a thing. Is it tricky to make?
sinanju
6th December 2011, 12:05
It's already part of a menu structure code that I released - look HERE (http://www.lfsforum.net/showthread.php?t=73585).
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).
Vaneo
6th December 2011, 13:40
Thanks a lot sinanju! You're genius! :) It now looks a way much better.
sarxes
7th December 2011, 12:29
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
sinanju
7th December 2011, 18:21
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.
sarxes
8th December 2011, 12:27
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
sinanju
8th December 2011, 16:02
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?
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.
sarxes
8th December 2011, 16:42
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 !!! :D
P.S. : You run a server ? whats the server name ? :D:thumb:
sinanju
9th December 2011, 00:35
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?
P.S. : You run a server ? whats the server name ? :D:thumb:
Sin'rs (Top Gear)
sarxes
9th December 2011, 07:19
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 ?
sarxes
17th December 2011, 13:43
What means IS_MTC couldn't not find destination ? :shrug:
sinanju
18th December 2011, 09:59
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;
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;
label_logo = "^1Sin'rs";
label_lfslogo = "^7powered by ^3LFSLapper";Where I have "Sin'rs", you can put your own Server Name.
sarxes
18th December 2011, 15:42
THX for Logo !!!!!!!! :thumbsup:
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 $Posabs = GetCurrentPlayerVar("PosAbs");. How could I extract the !drf table position instead ot !top position ??? :shrug:
sinanju
18th December 2011, 21:04
Unfortunately, there's nothing like that.
Couple of things you could try, are;
$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
Sub SR_drfnear( $KeyFlags,$id )
$NickName = GetCurrentPlayerVar("NickName");
drfNear( $NickName );
EndSubBasically, this will just show up exactly same as if driver typed !drfnear; just it would save having to remember the correct command.
sarxes
13th January 2012, 10:21
Hy Sin
I would like to make a button on the right buttom corner which is clickable and if a player click on it it shows the !drf list :) How could i make that ?
And 1 more question, how could I edit the lapper to show the Drift Score on passing the finish line in Practice mode , I want to players could join to race frop pit not from a starting point because the race its lapped and there is no start point they were teleported to the left middle in front of the traffic lights ... It were easy to poiting the race in practice mode and showing the score after passing the finish line !
sinanju
15th January 2012, 10:19
Hy Sin
I would like to make a button on the right buttom corner which is clickable and if a player click on it it shows the !drf list :) How could i make that ?
Somewhere after the line that starts - Event OnConnect( $userName ) # Player event - add the following lines
openPrivButton( "button_driftscore_back",4,159,22,7,1,-1,16,"" );
openPrivButton( "button_driftscore",5,160,20,5,1,-1,32,"^1Drift Scores",SR_drfnear);Then after the line - EndEvent - add the following
Sub SR_drfnear( $KeyFlags,$id )
$NickName = GetCurrentPlayerVar("NickName");
drfNear( $NickName );
EndSubHaven't tested it, but should work.
In one of the code lines, above, you'll see that part of the code is
5,160,20,5,1,-1,32,"^1Drift
The first number is how far right the button/text starts, 2nd number is how far down, 3rd number is how wide button/text goes, 4th number is how high, 5th number is spacing between lines, the -1 means always there until bit of code in another event switches button off, the 32 is for background colour and text justification, and ^1 is for the colour.
You may have to or want to change button location, size, colours, etc, to suit.
sarxes
15th January 2012, 14:24
Somewhere after the line that starts - Event OnConnect( $userName ) # Player event - add the following lines
openPrivButton( "button_driftscore_back",4,159,22,7,1,-1,16,"" );
openPrivButton( "button_driftscore",5,160,20,5,1,-1,32,"^1Drift Scores",SR_drfnear);Then after the line - EndEvent - add the following
Sub SR_drfnear( $KeyFlags,$id )
$NickName = GetCurrentPlayerVar("NickName");
drfNear( $NickName );
EndSubHaven't tested it, but should work.
In one of the code lines, above, you'll see that part of the code is
5,160,20,5,1,-1,32,"^1Drift
The first number is how far right the button/text starts, 2nd number is how far down, 3rd number is how wide button/text goes, 4th number is how high, 5th number is spacing between lines, the -1 means always there until bit of code in another event switches button off, the 32 is for background colour and text justification, and ^1 is for the colour.
You may have to or want to change button location, size, colours, etc, to suit.
Its doesnt work ... I doesnt shows nothing ... :shrug:
sinanju
16th January 2012, 13:07
Just been checking, and found out that Drift scores are NOT saved in when in Practise mode!
In race mode, my code works.
I've added some txt files to show various ways of implementing the button - if you don't want people complaining of the mouse cursor being on screen when on track, I'd suggest using 3rd method.
1 EventOnConnect
2 EventOnLap
3 Event OnLeaveRace
sarxes
16th January 2012, 17:52
Just been checking, and found out that Drift scores are NOT saved in when in Practise mode!
Could you remake the code to work in Practice mode too or its a big request ??? :tilt::shy:
P.S.: I made the button working for clicking and I have a problem with this ... Should I rewrite the code to display the scores from the 1st position to the last , and player could go beatweean pages ... That the players scores are paged in 18/page
sinanju
16th January 2012, 19:07
Could you remake the code to work in Practice mode too or its a big request ?
I suspect this is a LFSLapper issue, so in not something I can code.
sarxes
16th January 2012, 19:17
I suspect this is a LFSLapper issue, so in not something I can code.
Maybe Gai-Luron could make working lapper to working on Practice ?
You should talk with Luron about that issue ... No ? PLS !
sinanju
16th January 2012, 19:33
I made the button working for clicking and I have a problem with this ... Should I rewrite the code to display the scores from the 1st position to the last , and player could go beatweean pages ... That the players scores are paged in 18/page
By default, both !drf and !top show only the top 18 places.
You can write code to show buttons that can give you other buttons to press that will give you different placings (e.g. 19 to 36, 37 to 54 etc).
If you want to see this in action, go to my server (Sin'rs), then spectate, and at the bottom of the screen you'll see a button appear "Menu System". Click on this, then choose "User Dashboard", then you'll see an option for Top Times, Top Drifts, etc.
You can either try code something for drifts yourself, or you could use my Menu code (which can be found HERE (http://www.lfsforum.net/showthread.php?t=73585)).
You could still keep the Drift Button on the player's screen (as coded in posts above), but instead of going to the Sub SR_drfnear sub-routine , you link it to the relevant section on my menu system (which in the menu system is Sub DoUserDrifts( $KeyFlags,$id).
If you want to code yourself, then look at my menu code - the Sub DoUserDrifts section. You'll see that there are a lot of open private buttons, with a sub-routine at the end of each line that starts "click_ ".
You could copy and use these buttons along with associated sub-routines, just laying out on the screen where-ever suits (horizontally, vertically, cell matrix, etc).
sarxes
16th January 2012, 19:51
By default, both !drf and !top show only the top 18 places.
You can write code to show buttons that can give you other buttons to press that will give you different placings (e.g. 19 to 36, 37 to 54 etc).
If you want to see this in action, go to my server (Sin'rs), then spectate, and at the bottom of the screen you'll see a button appear "Menu System". Click on this, then choose "User Dashboard", then you'll see an option for Top Times, Top Drifts, etc.
You can either try code something for drifts yourself, or you could use my Menu code (which can be found HERE (http://www.lfsforum.net/showthread.php?t=73585)).
You could still keep the Drift Button on the player's screen (as coded in posts above), but instead of going to the Sub SR_drfnear sub-routine , you link it to the relevant section on my menu system (which in the menu system is Sub DoUserDrifts( $KeyFlags,$id).
If you want to code yourself, then look at my menu code - the Sub DoUserDrifts section. You'll see that there are a lot of open private buttons, with a sub-routine at the end of each line that starts "click_ ".
You could copy and use these buttons along with associated sub-routines, just laying out on the screen where-ever suits (horizontally, vertically, cell matrix, etc).
Sin u r like a GOD !!! Thx for your help !!! Just one more question , how should I rewrite the SR_driftnear to display the !drf list ? My last question :)
sinanju
16th January 2012, 21:36
how should I rewrite the SR_driftnear to display the !drf list ? My last question :)
In my earlier post(s), I had the following line of code:
openPrivButton( "button_driftscore",5,160,20,5,1,-1,32,"^1Drift Scores",SR_drfnear);
The SR_drfnear part of that line is the Sub-Routine that is activated when the button is clicked.
You could put your own sub-routine in any button.
Couple of Drift score examples;
openPrivButton( "button_drift_example1",35,160,20,5,1,-1,32,"^1Top Drift Scores",SR_drfTop);
Sub SR_drfTop( $KeyFlags,$id )
drf( $argv );
EndSub openPrivButton( "button_drift_example2",65,160,20,5,1,-1,32,"^1Top Drift Scores",SR_drfTop19to36);
Sub SR_drfTop19to36( $KeyFlags,$id )
drf( 19 );
EndSub
sarxes
17th January 2012, 12:38
I thought a lot for my problem about practice mode. The solution is that to make a command that the new players auto teleported to pit so they cant start the race from the layout they have to get out from the pit in AU1 and this is the way for the scored laps.
Could you make lapper to auto pit players who join in server ?
sinanju
17th January 2012, 14:28
Have you got a start point (green arrow) in your layout?
I think this does what you want automatically.
sinanju
17th January 2012, 17:32
a command that the new players auto teleported to pit ...... Could you make lapper to auto pit players who join in server ?
Something like
$NickName = GetCurrentPlayerVar("NickName");
cmdLFS( "/pitlane " . NickName );
Not sure in which event (Event On? newplayerjoin?) you could use it though.
sarxes
17th January 2012, 18:00
Okay :) I will try :)
sarxes
18th January 2012, 17:51
Hy Sin,
Here is my new question :D Its possible to group the drift score by car and scroll between the scores ... I attached my idea of it how it be looks like and all is under the Drift Scores button what u made :)
And I would like to put if admin is online and show his name its on picture too my idea and if is not show the message : Not online :)
P.S. : And its possible that players couldnt go anywhere from start position until the timer not finish with countdown ! :)
What means that ?
2/3/2012 5:46:44 PM -> Can't open group file : ./default/./Text_Files/admin1.txt
2/3/2012 5:46:44 PM -> Can't open group file : ./default/./Text_Files/admin2.txt
sinanju
8th February 2012, 14:21
...What means that ?
2/3/2012 5:46:44 PM -> Can't open group file : ./default/./Text_Files/admin1.txt
2/3/2012 5:46:44 PM -> Can't open group file : ./default/./Text_Files/admin2.txt
Likely you haven't got any admin1.txt and admin2.txt files, so you will need to set them up manually.
In your /default directory (same directory your lfslapper.lpr file is stored) make a new directory called Text_Files. In that directory, make a blank text file and call it admin1.txt, then make another text file and call it admin2.txt.
sinanju
8th February 2012, 14:23
And its possible that players couldnt go anywhere from start position until the timer not finish with countdown !]
The way I do it is if players jump the lights, then I spectate them.
Look for Event OnFalseStartL1 in your lfslapper.lpr file.
add the following line (before the EndEvent line)
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );Also do the same with the Event OnFalseStartL2.
sinanju
8th February 2012, 14:43
I would like to put if admin is online and show his name its on picture too my idea and if is not show the message : Not onlineThis could probably be done - let me think about it some - but not promising anything.
sinanju
8th February 2012, 15:07
possible to group the drift score by car and scroll between the scores
The first part is easy enough, but not sure what you mean by the scrolling part (up and down an individual car table?).
First you need a button that will open up a set of buttons, each with car name on it. (This could be set up on the sub-routine that starts when you click your "Click for Drift Scores" button in bottom right of your image.
For instance,
openPrivButton( "XRG_button",70,25,10,5,2,-1,16,"XRG",Click_XRG );
openPrivButton( "XRT_button",80,25,10,5,2,-1,16,"XRT",Click_XRT );
openPrivButton( "RB4_button",90,25,10,5,2,-1,16,"RB4",Click_RB4 );
openPrivButton( "FXO_button",100,25,10,5,2,-1,16,"FXO",Click_FXO );
openPrivButton( "RAC_button",110,25,10,5,2,-1,16,"RAC",Click_RAC );
openPrivButton( "FZ5_button",120,25,10,5,2,-1,16,"FZ5",Click_FZ5 );
openPrivButton( "LX4_button",130,25,10,5,2,-1,16,"LX4",Click_LX4 );
openPrivButton( "LX6_button",140,25,10,5,2,-1,16,"LX6",Click_LX6 );
Each of these buttons has sub-routine (e.g Click_XRG) that when car name button is clicked, then the sub-routine is invoked.
The sub-routines for these buttons could look like;
Sub Click_XRG( $KeyFlags,$id )
drf ( XRG );
EndSub
This would show the top 18 places for that particular car.
As part of the sub-routine, you could add further buttons with arrows ([<] and [>]) and these are tied to further sub-routines, e.g. clicking on the [>] button takes you to a sub-routine with following line
drf ( XRG 19 );
My way would be tedious to code, but is fairly easy to do (look in my Menu.lpr file and you'll see how I've done my Top and Drift tables - this would just be something like that).
sarxes
8th February 2012, 17:34
As part of the sub-routine, you could add further buttons with arrows ([<] and [>]) and these are tied to further sub-routines, e.g. clicking on the [>] button takes you to a sub-routine with following line
drf ( XRG 19 );
My way would be tedious to code, but is fairly easy to do (look in my Menu.lpr file and you'll see how I've done my Top and Drift tables - this would just be something like that).
Could you make me these buttons to jump between pages in drift score list ? I dont need the grouping the cars
sinanju
9th February 2012, 20:55
Been playing around with the drf function, but no matter what I do, unless I do something like
Sub Click_DRF( $KeyFlags,$id )
drf ( 1 );
EndSub
or
Sub Click_DRF( $KeyFlags,$id )
drf ( $argv);
EndSub
then I can't get the table to list just car of a particular type.
Tried things like
Sub Click_DRF( $KeyFlags,$id )
drf ( RB4);
EndSub
but couldn't get anything to work.
sarxes
9th February 2012, 22:57
Been playing around with the drf function, but no matter what I do, unless I do something like
Sub Click_DRF( $KeyFlags,$id )
drf ( 1 );
EndSub
or
Sub Click_DRF( $KeyFlags,$id )
drf ( $argv);
EndSub
then I can't get the table to list just car of a particular type.
Tried things like
Sub Click_DRF( $KeyFlags,$id )
drf ( RB4);
EndSub
but couldn't get anything to work.
I will give it a try maybe should work ... I saw the function on a demo server that I could jump between pages from first top 18 to last page... maybe 200 and there was a button with i could jump back from page to page to top 18 ... Idk how was the script but if this code will work I'll be very happynes !!! But thanks anyway for you effort !!! U r a good man :)
sinanju
10th February 2012, 11:04
I will give it a try maybe should work ... I saw the function on a demo server that I could jump between pages from first top 18 to last page... maybe 200 and there was a button with i could jump back from page to page to top 18 ... Idk how was the script but if this code will work I'll be very happynes !!! But thanks anyway for you effort !!! U r a good man :)
Try the attached.
Unzip, and follow instructions in the code (basically add into the \includes folder and amend the addonsused.lpr file).
The lapper code is bit long winded (proper coders will wince!), but should be extremely easy to follow, and amend if you want to go past 200 top scores.
If you want to change the vertical location of the buttons then search foir the line GlobalVar $DorigT and read/amend to suit.
When using the arrows, no need to click the Drift Table's OK button; table closes and re-opens to new page when using arrows.
Code is written in such a way that original button that starts process can only be seen when you leave the track, and whole process closes when you rejoin.
sarxes
10th February 2012, 14:18
Try the attached.
Unzip, and follow instructions in the code (basically add into the \includes folder and amend the addonsused.lpr file).
The lapper code is bit long winded (proper coders will wince!), but should be extremely easy to follow, and amend if you want to go past 200 top scores.
If you want to change the vertical location of the buttons then search foir the line GlobalVar $DorigT and read/amend to suit.
When using the arrows, no need to click the Drift Table's OK button; table closes and re-opens to new page when using arrows.
Code is written in such a way that original button that starts process can only be seen when you leave the track, and whole process closes when you rejoin.
Its so nice, u are a genius ! But there is a problem all with this I attached the problem ... I know u fix is so fast ... !
I want to be visible after leaving the pit always :)
paul88
10th February 2012, 22:54
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\sr c\Commun\CodePage.cs:line 176
at InSim.Decoder.pakGetString(Byte[] pak, Int32 first, Int32 len) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\InSim4.cs:line 781
at InSim.Decoder.VER..ctor(Byte[] packet) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\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\sr c\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\sr c\InSim4.cs:line 255
at LFSLapper.LFSListen.Listen.openStbMode() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\LFSListen\Listen.cs:line 98
at LFSLapper.LFSListen.Listen.startStbMode() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\LFSListen\Listen.cs:line 197
at LFSLapper.LFSListen.Listen.start() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\LFSListen\Listen.cs:line 153
System.String GetString(Byte[], Int32, Int32)
Closing Instance...
please help
thanks
sinanju
10th February 2012, 22:56
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.
sarxes
11th February 2012, 13:46
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\sr c\Commun\CodePage.cs:line 176
at InSim.Decoder.pakGetString(Byte[] pak, Int32 first, Int32 len) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\InSim4.cs:line 781
at InSim.Decoder.VER..ctor(Byte[] packet) in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\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\sr c\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\sr c\InSim4.cs:line 255
at LFSLapper.LFSListen.Listen.openStbMode() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\LFSListen\Listen.cs:line 98
at LFSLapper.LFSListen.Listen.startStbMode() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\LFSListen\Listen.cs:line 197
at LFSLapper.LFSListen.Listen.start() in D:\Dev\DevInsim\lapper\LFSLapper5.840\LFSLapper\sr c\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 ?
sarxes
11th February 2012, 17:08
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 ....:D
paul88
11th February 2012, 17:34
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
sinanju
11th February 2012, 17:46
...I want to show only 1 drift score for an account....:D
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?
sinanju
11th February 2012, 17:52
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 (http://www.lfsforum.net/showthread.php?t=72589)for admin to see if it helps.
sarxes
11th February 2012, 19:44
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 :)
paul88
11th February 2012, 19:54
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
sarxes
11th February 2012, 20:19
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
##################
#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
privRcm( langEngine( "%{main_onnewpb_rank2}%" ,GetCurrentPlayerVar("Car"),GetCurrentPlayerVar("PosAbs") ) );
and put " # " before privRcm withour quote marks like me
#privRcm( langEngine( "%{main_onnewpb_rank2}%" ,GetCurrentPlayerVar("Car"),GetCurrentPlayerVar("PosAbs") ) );
paul88
11th February 2012, 21:58
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 ??
:)
sinanju
11th February 2012, 23:14
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.
sarxes
12th February 2012, 10:32
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 ...
Yisc[NL]
12th February 2012, 15:45
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
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
Yisc[NL]
12th February 2012, 18:40
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.
And found the answer to this myself again. Turned out it is a configurable value in LFSServers.cfg , raised the timeOutScript value to 10000
Yisc[NL]
12th February 2012, 20:33
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?
sarxes
17th February 2012, 12:27
Hy Sin,
:smileypul My new question is attached on the imaged :)
sinanju
17th February 2012, 17:32
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.
sarxes
17th February 2012, 18:07
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...
Bass-Driver
25th February 2012, 17:46
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??
Yisc[NL]
25th February 2012, 18:13
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.
Bass-Driver
25th February 2012, 18:56
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
Yisc[NL]
25th February 2012, 19:30
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 )
Bass-Driver
25th February 2012, 19:41
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
sinanju
4th March 2012, 23:48
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.
Krayy
6th March 2012, 19:25
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.
sarxes
15th March 2012, 21:10
Hy Sinanju,
How the things are ? I didnt posted any questions but now i do. What I need the rewrite in driftmeter to show the driftbox after my speed is reached 20 KM/h so if I stop and my speed is 0 I want to dissapear and if i reach again the 20KM/h to show again. :)
ThX friend !
sinanju
15th March 2012, 22:16
What I need the rewrite in driftmeter to show the driftbox after my speed is reached 20 KM/h so if I stop and my speed is 0 I want to dissapear and if i reach again the 20KM/h to show again.
Firstly, change $MinimumDriftSpeed to
$MinimumDriftSpeed = 20This will be in the driftmeter.lpr configuration file.
It may also appear in the LFSLapper.lpr file - if it is, either delete the line or change it too.
Do you want the score to disappear, or do you want the whole scorebox to disappear?
Whichever, it would mean inclusion of an IF-THEN-ELSE-ENDIF.
For example;
IF ($MinimumDriftSpeed <20)
THEN
....
.. code in here to hide score or whole scorebox
....
ELSE
....
.. code in here to show score or whole scorebox
....
ENDIF
Driftmeter.lpr already uses IF-ENDIF for lots of things - you just need an additional one.
Good luck!
sarxes
16th March 2012, 09:39
I made this but its doesnt show nothing
CatchEvent OnDriftScore( $userName ) # This is the section for displaying the Drift Meter and Drift Messages
$AngleVelocity = GetCurrentPlayerVar( "AngleVelocity" );
$DriftScore = GetCurrentPlayerVar( "DriftScore" );
$LastDriftScore = GetCurrentPlayerVar( "LastDriftScore" );
IF ($MinimumDriftSpeed <25)
THEN
closePrivButton( "mylogo",5,138,22,3,1,-1,16,langEngine( "%{driftmeter_mylogo}%" ));
closePrivButton( "driftboxback",5,137,22,35,4,-1,16," ");
closePrivButton( "driftanglebox",6,146,10,20,4,-1,16," ");
closePrivButton( "driftcombbox",16,146,10,10,3,-1,16," ");
closePrivButton( "driftscorebox",16,156,10,10,3,-1,16," ");
closePrivButton( "driftangleboxtext",6,146,10,5,3,-1,0,langEngine( "%{driftmeter_driftangleboxtext}%" ));
closePrivButton( "driftcomboboxtext",16,146,10,5,3,-1,0,langEngine( "%{driftmeter_driftcomboboxtext}%" ));
closePrivButton( "driftscoreboxtext",16,156,10,5,3,-1,0,langEngine( "%{driftmeter_driftscoreboxtext}%" ));
closePrivButton( "TDSM",6,140,20,4,2,-1,16,langEngine( "%{driftmeter_TDSM}%" ) );
closePrivButton( "driftcomboboxtexttop",85,1,30,7,4,-1,96,langEngine( "%{driftmeter_driftcomboboxtexttop}%" , $DriftScore ) );
ELSE
openPrivButton( "mylogo",5,138,22,3,1,-1,16,langEngine( "%{driftmeter_mylogo}%" ));
openPrivButton( "driftboxback",5,137,22,35,4,-1,16," ");
openPrivButton( "driftanglebox",6,146,10,20,4,-1,16," ");
openPrivButton( "driftcombbox",16,146,10,10,3,-1,16," ");
openPrivButton( "driftscorebox",16,156,10,10,3,-1,16," ");
openPrivButton( "driftangleboxtext",6,146,10,5,3,-1,0,langEngine( "%{driftmeter_driftangleboxtext}%" ));
openPrivButton( "driftcomboboxtext",16,146,10,5,3,-1,0,langEngine( "%{driftmeter_driftcomboboxtext}%" ));
openPrivButton( "driftscoreboxtext",16,156,10,5,3,-1,0,langEngine( "%{driftmeter_driftscoreboxtext}%" ));
openPrivButton( "TDSM",6,140,20,4,2,-1,16,langEngine( "%{driftmeter_TDSM}%" ) );
openPrivButton( "driftcomboboxtexttop",85,1,30,7,4,-1,96,langEngine( "%{driftmeter_driftcomboboxtexttop}%" , $DriftScore ) );
ENDIF
sinanju
16th March 2012, 10:03
When closing a button, you only use the button name - not the placement, dimensions, etc., of the button.
So instead of
closePrivButton( "mylogo",5,138,22,3,1,-1,16,langEngine( "%{driftmeter_mylogo}%" ));
closePrivButton( "driftboxback",5,137,22,35,4,-1,16," ");
etc., etc.
you would use
closePrivButton( "mylogo&driftboxback");
The bit after the first open bracket (shown here in red), and between quotes, is the button name.
If you wanted to close further buttons, you separate them with an ampersand (&) symbol.
Apart from that, not sure if your code would work anyway.
Haven't looked at my code, but you may be trying to close buttons that haven't already been placed on screen.
Maybe try code other way round, so instead of something like
IF ($MinimumDriftSpeed <25)
THEN
closePrivButton( "mylogo&driftboxback");
ELSE
openPrivButton( "mylogo",5,138,22,3,1,-1,16,langEngine( "%{driftmeter_mylogo}%" ));
openPrivButton( "driftboxback",5,137,22,35,4,-1,16," ");
ENDIF
try
IF ($MinimumDriftSpeed >25)
THEN
openPrivButton( "mylogo",5,138,22,3,1,-1,16,langEngine( "%{driftmeter_mylogo}%" ));
openPrivButton( "driftboxback",5,137,22,35,4,-1,16," ");
ELSE
ENDIF
If buttons are already on screen when doing less than 25kph, then between ELSE and ENDIF, add
closePrivButton( "mylogo&driftboxback");
IF closePrivButton isn't needed then don't use it - why risk getting errors with lapper trying to close non existent buttons?
sarxes
16th March 2012, 10:24
[/COLOR][/COLOR]try
IF ($MinimumDriftSpeed >25)
THEN
openPrivButton( "mylogo",5,138,22,3,1,-1,16,langEngine( "%{driftmeter_mylogo}%" ));
openPrivButton( "driftboxback",5,137,22,35,4,-1,16," ");
ELSE
ENDIF
If buttons are already on screen when doing less than 25kph, then between ELSE and ENDIF, add
closePrivButton( "mylogo&driftboxback");
IF closePrivButton isn't needed then don't use it - why risk getting errors with lapper trying to close non existent buttons?
Its doesnt work :/
And how should I integrate the drift list like this racepos ? I added the button but I dont know how on continue ....
sinanju
16th March 2012, 15:35
Tried various ways of adding IF..ENDIF statements, then sub-routines if score was on or above set speed then show, and if not, don't show, but couldn't get anything to work.
Then had a look thru the list of Events that are allowed, and found
# Actions to do when drift score is resette to zero when to low speed.
Event OnDriftResetScore( $userName ) # Player event
EndEventSo basically, you just want to put the close button line(s) in between the event and endevent - or in this case, because it's an add-on, then it would be CatchEvent / EndCatchEvent.
To make it easier, I've renamed some of the buttons (adding 'drift' in front of name, so that I could use closeButtonRegex to close all buttons that start "drift.....", and attached new driftmeter that you can try.
Tried it, but although it seems to work ok, not big fan of it.
I can see some people complaining on your server that it keeps disappearing for no reason (when it drops below your set speed).
As an alternative, you could make additional button like
openPrivButton( "drift_explain",5,137,22,6,4,-1,32,"^1Too Slow%nl% %nl%Lost Scores" );and add that at the end of the CatchEvent OnDriftResetScore section.
sinanju
16th March 2012, 15:47
And how should I integrate the drift list like this racepos ? I added the button but I dont know how on continue ....
On the image, it looks like the "Racepos" tab has been clicked and is showing the top driver time positions (as per Krayy's CIF module).
What happens if you click the "Drift List" tab?
Do you get a table like the 'Racepos' table, but driftscores instead of times?
If so, maybe you could ask server admins how it's done, as it's way way way beyond my meagre skills!
sarxes
16th March 2012, 17:29
As an alternative, you could make additional button like
openPrivButton( "drift_explain",5,137,22,6,4,-1,32,"^1Too Slow%nl% %nl%Lost Scores" );and add that at the end of the CatchEvent OnDriftResetScore section.
There is something wrong in the new driftmeter :
driftmeter_TDS01 = "^8?";
driftmeter_TDS11 = "^0:(";
driftmeter_TDS21 = "^2+";
driftmeter_TDS31 = "^3++";
driftmeter_TDS41 = "^4*";
driftmeter_TDS51 = "^5**";
driftmeter_TDS61 = "^6:)";
driftmeter_TDS62 = "^6*";
driftmeter_TDS71 = "^7!";
driftmeter_TDS81 = "^8!!";
driftmeter_TDS91 = "^1:)";
These "icons" are wont show in the new driftmeter .... :/
sinanju
16th March 2012, 17:49
There is something wrong in the new driftmeter/
I've just re-loaded the file I zipped up, and it works ok for me (using in offline mode).
Did you change anything in the file?
sinanju
16th March 2012, 18:02
I've just updated my last driftmeter.lpr code with addition of 'Too Slow' message to replace scorebox when speed drops too low - see attached.
sarxes
16th March 2012, 18:02
3/16/2012 8:05:35 PM -> Syntax error in cfg file "./includes/driftmeter.lpr" at line #232
Function not defined...closeButtonRegex
Function 'ondriftscore./includes/driftmeter.lpr-50' script aborted
3/16/2012 8:05:39 PM -> Syntax error in cfg file "./includes/driftmeter.lpr" at line #116
Function not defined...closeButtonRegex
Function 'ondriftscore./includes/driftmeter.lpr-50' script aborted
3/16/2012 8:05:40 PM -> Syntax error in cfg file "./includes/driftmeter.lpr" at line #232
Function not defined...closeButtonRegex
Function 'ondriftscore./includes/driftmeter.lpr-50' script aborted
3/16/2012 8:05:43 PM -> Syntax error in cfg file "./includes/driftmeter.lpr" at line #116
Function not defined...closeButtonRegex
Function 'ondriftscore./includes/driftmeter.lpr-50' script aborted
3/16/2012 8:05:45 PM -> Syntax error in cfg file "./includes/driftmeter.lpr" at line #116
Function not defined...closeButtonRegex
Function 'ondriftscore./includes/driftmeter.lpr-50' script aborted
3/16/2012 8:05:45 PM -> Syntax error in cfg file "./includes/driftmeter.lpr" at line #349
Function not defined...closeButtonRegex
Function 'ondriftresetscore./includes/driftmeter.lpr-348' script aborted
I've just re-loaded the file I zipped up, and it works ok for me (using in offline mode).
Did you change anything in the file?
sinanju
17th March 2012, 08:29
What version of lapper are you using?
The closeButtonRegex expression came out in version 5.926, so if you're getting these errors it would appear that you are using an earlier version.
I've just downloaded my new file and tried it on my other pc with lapper v6.012 and it's working fine.
So I would advise upgrading to version 6.012 or later.
Krayy's added a lot of cool stuff to the later versions of lapper via his CIF modules, so worth it just for them. And you've more chance of things working!
sarxes
17th March 2012, 15:48
Yeah , okay I resolved :) So how should I do that I made route chackers on track and I want to spectate players who drive trough on a chacker tiwce !
I attached an ex. picture . So there is players who make a lot of circles around the red line what I suggest on the picture and they have a lot of drift points ! Or its good for me that if someone drive twice on a route chacker reset the drift point to zero
and my other question is that why
CatchEvent OnSplit1( $userName ) # Player event
IF ( $DriftScore > 0 )
THEN
$DriftScore=0
ENDIF
IF ( $LastDriftScore > 0 )
THEN
$LastDriftScore=0
ENDIF
EndCatchEvent
this code doesnt work ... :(
sinanju
18th March 2012, 09:13
and my other question is that why
CatchEvent OnSplit1( $userName ) # Player event
IF ( $DriftScore > 0 )
THEN
$DriftScore=0
ENDIF
IF ( $LastDriftScore > 0 )
THEN
$LastDriftScore=0
ENDIF
EndCatchEventthis code doesnt work ... :(
Because you haven't told lapper what $DriftScore & $LastDriftScore are or what they mean.
On every Event (including CatchEvent), you need to define each of the variables you're going to use.
Try
CatchEvent OnSplit1( $userName ) # Player event
$DriftScore = GetCurrentPlayerVar( "DriftScore" );
$LastDriftScore = GetCurrentPlayerVar( "LastDriftScore" );
IF ( $DriftScore > 0 )
THEN
$DriftScore=0
ENDIF
IF ( $LastDriftScore > 0 )
THEN
$LastDriftScore=0
ENDIF
EndCatchEvent
sinanju
18th March 2012, 09:19
So how should I do that I made route chackers on track and I want to spectate players who drive trough on a chacker tiwce !
Route Checkers are automatic LFS events, and nothing to do with any InSims.
If someone goes thru route checkers in the wrong order, or the same checker twice, then they should be automatically spectated.
sarxes
18th March 2012, 12:12
THX a lot for your help again , but the code doesnt work any more :(
paul88
23rd March 2012, 13:10
guys need help on lapper when in lfs you have t!pwgui set pit window when this is set to 1 pit window with tyre change nothing is done am i missing something ?
Krayy
23rd March 2012, 18:18
guys need help on lapper when in lfs you have t!pwgui set pit window when this is set to 1 pit window with tyre change nothing is done am i missing something ?
We're currently rewriting that module for the new lapper version, so we'll fix it in the next release
Yisc[NL]
23rd March 2012, 18:24
The tyre change part was never finished, since I couldn't get it to work in the older Lapper version. Maybe it would be working with the latest version of Lapper.
sarxes
24th March 2012, 12:39
There is any way to run LFS lapper without dedicated host in single player ?
Krayy
24th March 2012, 19:22
There is any way to run LFS lapper without dedicated host in single player ?
LFS needs a lfs server to connect to, so technically you can run LFS on your PC and set it up as a local server then connect Lapper to that
ViKTOOR-LFS
31st March 2012, 16:11
hi guys i need help here...
about
###################################
#Authorization Options ( license )#
###################################
how i can Choose only Friends licenses Join to server<for Example
coz I've seen this before and the server kicked me because I did not register to website for drift team or something like that !! But I was not sure about the InSim lfslapper or somthing else !!
Krayy
31st March 2012, 22:46
hi guys i need help here...
about
###################################
#Authorization Options ( license )#
###################################
how i can Choose only Friends licenses Join to server<for Example
coz I've seen this before and the server kicked me because I did not register to website for drift team or something like that !! But I was not sure about the InSim lfslapper or somthing else !!
To be honest I've never understood the Auth system myself.
What exactly are you wanting to acheive?
ViKTOOR-LFS
2nd April 2012, 10:08
To be honest I've never understood the Auth system myself.
What exactly are you wanting to acheive?
i need for exp. when someone or anyone try to join the server he get kick or ban already and Leave him a message or link to take my approved.If allowed to enter I put his name on lfslapper or admin.txt or somthing like that !! Because I have problems with some licenses users and I want to chose any licenses only allow to enter the server. i hope u you get my point
Lang "EN"
main_welc2 = "^7You are not allowed to join this server unless you have been approved by the server admin."
. "%nl%^2Please visit <this website> to apply for approval."
. "%nl%"
. "%nl%^4Approval is required as we have a problem with new users coming here and causing accidents, and not understanding the rules
^^
and when this message show i cant know how to do auto kick or ban. only when he press "OK" he get kicked >> me also i cant join i only have "ok" to kicked my self loool.. so i stop the lfslapper Until I find a solution to this problem
Yisc[NL]
2nd April 2012, 16:34
What you really want is to set this:
Event OnNewPlayerJoin()
UserGroupFromFile( "authorised_ab_users", "./Authorisation.txt" );
$userName = GetCurrentPlayerVar ( "UserName" );
IF( UserInGroup( "authorised_ab_users",$userName ) != 1 )
THEN
cmdLFS("/spec " . GetCurrentPlayerVar("Nickname") );
cmdLFS("/msg " . GetCurrentPlayerVar("Nickname") . "^3 not allowed on this server");
ENDIF
EndEvent
This way only the people mentioned (you will need their LFS world names, instead of the nicknames they use) in your Authorisation.txt will have access to your server. If you are not on that list, you will get spectated (/spec) and get a message (/msg) that your not allowed on this server.
Krayy
2nd April 2012, 21:18
The Membership Admin gui will do this as weel in that it allows you to make a racer a guest, visitor. full member or admin. Then you can just test that when they log on to see what permissions they have. No reason why it cannot be modified to be a license grading system as well.
In fact thats a good idea for an addon...
ViKTOOR-LFS
2nd April 2012, 22:03
;1700745']What you really want is to set this:
Event OnNewPlayerJoin()
UserGroupFromFile( "authorised_ab_users", "./Authorisation.txt" );
$userName = GetCurrentPlayerVar ( "UserName" );
IF( UserInGroup( "authorised_ab_users",$userName ) != 1 )
THEN
cmdLFS("/spec " . GetCurrentPlayerVar("Nickname") );
cmdLFS("/msg " . GetCurrentPlayerVar("Nickname") . "^3 not allowed on this server");
ENDIF
EndEvent
This way only the people mentioned (you will need their LFS world names, instead of the nicknames they use) in your Authorisation.txt will have access to your server. If you are not on that list, you will get spectated (/spec) and get a message (/msg) that your not allowed on this server.
thnx Yisc[NL] for replay :thumbsup:
i did what u say capy&paste on lfslapper.lpr
but about the Authorisation.txt !! i made 1 txt Next to the lfslapper.lpr
and i make Edit for default_1 To type $ApprovedFile = "./Authorisation.txt";
when i restart lfslapper >> nothing happen !!
Yisc[NL]
3rd April 2012, 06:16
There is no need to place this in default_1.ini : $ApprovedFile = "./Authorisation.txt";
I have just tested the code myself (with the new uploaded Lapper version 6.0.1.3) and I spotted a small error in the code I gave you earlier, this is the right code:
##########################################
#New PLayer joining race or leaving pits)#
##########################################
Event OnNewPlayerJoin( $userName ) # Player event
UserGroupFromFile( "authorised_users", "./Authorisation.txt" );
$userName = GetCurrentPlayerVar ( "UserName" );
IF( UserInGroup( "authorised_users",$userName ) != 1 )
THEN
cmdLFS("/spec " . GetCurrentPlayerVar("Nickname") );
cmdLFS("/msg " . GetCurrentPlayerVar("Nickname") . "^3 not allowed on this server");
ENDIF
EndEvent
Further you have to make sure the Authorisation.txt is in the same place as your LFSLapper.lpr file , and to put one username per line in the Authorisation.txt , like this:
yisc[nl]
ViKTOOR-LFS
Kravy
ViKTOOR-LFS
3rd April 2012, 16:02
;1700968']There is no need to place this in default_1.ini : $ApprovedFile = "./Authorisation.txt";
I have just tested the code myself (with the new uploaded Lapper version 6.0.1.3) and I spotted a small error in the code I gave you earlier, this is the right code:
##########################################
#New PLayer joining race or leaving pits)#
##########################################
Event OnNewPlayerJoin( $userName ) # Player event
UserGroupFromFile( "authorised_users", "./Authorisation.txt" );
$userName = GetCurrentPlayerVar ( "UserName" );
IF( UserInGroup( "authorised_users",$userName ) != 1 )
THEN
cmdLFS("/spec " . GetCurrentPlayerVar("Nickname") );
cmdLFS("/msg " . GetCurrentPlayerVar("Nickname") . "^3 not allowed on this server");
ENDIF
EndEvent
Further you have to make sure the Authorisation.txt is in the same place as your LFSLapper.lpr file , and to put one username per line in the Authorisation.txt , like this:
yisc[nl]
ViKTOOR-LFS
Kravy
already did what u told me
but this Code not working with me !:shrug:
Yisc[NL]
3rd April 2012, 17:38
Could you upload your LFSLapper.lpr file here?
You have to rename it to *.txt and then will be able to upload it, so I can have a look.
Which version of Lapper are you using?
ViKTOOR-LFS
3rd April 2012, 18:14
;1701146']Could you upload your LFSLapper.lpr file here?
You have to rename it to *.txt and then will be able to upload it, so I can have a look.
Which version of Lapper are you using?
LFSLapper, Version=6.0.1.2 by Robert BRACCAGNI ( Gai-Luron )
Yisc[NL]
3rd April 2012, 22:49
LFSLapper, Version=6.0.1.2 by Robert BRACCAGNI ( Gai-Luron )
I've tested your file in Lapper 6.0.1.2 and it's working instantly.
As soon as I try to join, I get the message that I am not allowed.
When I then put my name in the Authorisation.txt , I can immediatly join the server, without having to restart Lapper.
Does Lapper make any connection to your LFS server at all?
Have you opened an insim port on your LFS server?
To do that, type this into the LFS chat: /insim 29999
That portnumber must be the same as set in your default_1.ini
This is my LFSServers.cfg:
# Configuration of LFSServer to be Managed with LFSLapper
# One line per server
# Remote port is the port used to manage LFSLapper remotely, future extension
# One remote port per LFSLapper on one machine, autoStart is optionnal
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autowork
timeOutScript=10000;
remotePort=3001;
DEF1|gr1|127.0.0.1|29999|./default|default_1.ini|autowork
And this in my default_1.ini:
$password = "changeme";
$configFile = "LFSLapper.lpr";
$superUsersFile = "superusers.txt";
ViKTOOR-LFS
4th April 2012, 12:27
;1701282']I've tested your file in Lapper 6.0.1.2 and it's working instantly.
As soon as I try to join, I get the message that I am not allowed.
When I then put my name in the Authorisation.txt , I can immediatly join the server, without having to restart Lapper.
Does Lapper make any connection to your LFS server at all?
Have you opened an insim port on your LFS server?
To do that, type this into the LFS chat: /insim 29999
That portnumber must be the same as set in your default_1.ini
This is my LFSServers.cfg:
# Configuration of LFSServer to be Managed with LFSLapper
# One line per server
# Remote port is the port used to manage LFSLapper remotely, future extension
# One remote port per LFSLapper on one machine, autoStart is optionnal
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autowork
timeOutScript=10000;
remotePort=3001;
DEF1|gr1|127.0.0.1|29999|./default|default_1.ini|autowork
And this in my default_1.ini:
$password = "changeme";
$configFile = "LFSLapper.lpr";
$superUsersFile = "superusers.txt";
bro my server working with 500servers from Control Panel Login
http://www.500control.co.uk
lfslapper is already start no proplem with that
they have Different numbers inside LFSServers.cfg to make lfslapper working.
remotePort=3918;
^7Saudi_Arabia_Cruise|gr1|84.45.52.141|17684|./default|default_1.ini|autowork
and default_1.ini i have same yours
but this code !! I do not know why this still not working :Looking_a
I am surprised that it worked well with you :D
if you want take a look to server :saudi_arabia_criuse
maby there is something should we do inside (addonsused.lpr) or Something Missing.
include ("./gui.lpr");
include( "./utils.lpr");
include( "./myInc.lpr");
# Help GUI
#### Include for splitting infos ####
#include( "./pitboard.lpr");
include( "./pitwindow_gui.lpr");
# OR
#include( "./defPitInfo.lpr");
#####################################
#### Include for drifting infos ####
#include( "./driftdef.lpr");
# OR
#include( "./driftmeter.lpr");
#####################################
include ("./debug.lpr");
# GUI Framework main include - this MUST be first
include ("./gui.lpr");
# Help GUI
include ("./gui_help.lpr"); # Multi-tabbed help (all in one)
# Admin GUI
include ("./gui_admin.lpr"); # Admin GUI root include
include ("./gui_admin_membership.lpr"); # Admin GUI Membership administration
include ("./gui_admin_handicaps.lpr"); # Admin GUI Handicap allocations
include ("./gui_help_cruise.lpr"); # Cruise help file (remove if not reqd)
include( "./safetycar.lpr");
include( "./ctrack.lpr");
#include( "./Cruise.lpr");
#include( "./Cruise_Settings.lpr");
include( "./guiconfig.lpr");
include( "./racecontrol.lpr");
include( "./who.lpr");
include( "./tops.lpr");
include ("./cif/info_newbie.lpr");
include( "./listevent.lpr");
#include( "./winnerflags.lpr");
include( "./scripts.lpr");
include ("./cif/help_custom.lpr");
include ("./cif/help_stats.lpr");
include ("./cif/help_admin.lpr");
include ("./cif/help_general.lpr");
include ("./cif/info_mystats.lpr"); # MyStats Information
include ("./cif/info_rules.lpr"); # Server Rules
Yisc[NL]
4th April 2012, 13:56
Could you upload the logfile please?
You can find them in the folder "logs" and then you will need: 84.45.52.141-17684-ERR.log
ViKTOOR-LFS
4th April 2012, 15:20
;1701408']Could you upload the logfile please?
You can find them in the folder "logs" and then you will need: 84.45.52.141-17684-ERR.log
yea sure
LFSLapper-MSS.txt
LFSLapper-ERR.txt<< i cant upload it .txt in lfsforum coz its 1.47 MB so i but it inside .rar
Yisc[NL]
4th April 2012, 19:07
Those are the log files of Lapper it self.
Inside the "default" directory, you will find another "logs" directory and I need the ERR file from there please.
ViKTOOR-LFS
4th April 2012, 20:36
:;1701514']those are the log files of lapper it self.
Inside the "default" directory, you will find another "logs" directory and i need the err file from there please.
84.45.52.141-17684-err
i open it and i found 2 txt file inside /default/Text_Files
but when i was searching for admin1,admin2 on google i found
http://www.lfsforum.net/showthread.php?p=1694998
i think this what you want from me to go >> listevent.lpr !!
CatchEvent OnLapperStart()
GlobalVar $arToClose;
GlobalVar $currUserGroup;
GlobalVar $pathAdminFile;
$pathAdminFile = "./Text_Files";
EndCatchEvent
CatchEvent OnMSO( $UserName, $text ) # Player event
$idxOfFirtsSpace = indexOf( $text, " ");
IF( $idxOfFirtsSpace == -1 ) THEN
$command = $text;
$argv = "";
ELSE
$command = subStr( $text,0,$idxOfFirtsSpace );
$argv = trim( subStr( $text,$idxOfFirtsSpace ) );
ENDIF
userGroupFromFile( "admin1",$pathAdminFile . "/admin1.txt");
UserGroupFromFile( "admin2",$pathAdminFile . "/admin2.txt");
SWITCH( Tolower( $command ) )
CASE "!ug":
IF( UserInGroup( "admin1",$UserName ) == 1 || UserInGroup( "admin2",$UserName ) == 1 )
THEN
IF ( $argv != "" ) THEN
privMsg("^6ADMIN - ^3CURRENT REGISTERED DRIVERS....");
$currUserGroup = $argv;
PrintUserGroup($currUserGroup);
ELSE
privMsg("^6ADMIN - YOU MUST SPECIFY A GROUP TO LIST");
ENDIF
ELSE
privMsg("^6ADMIN - ^2YOU DO NOT HAVE ADMIN STATUS!");
ENDIF
BREAK;
ENDSWITCH
EndCatchEvent
:confused:
Yisc[NL]
4th April 2012, 22:24
Hmm, the log file doesn't show any problems regarding the event we are talking about.
So I only have one last solution, make a RAR file of the whole Lapper directory and upload it here.
I will download that and start your Lapper on a test server of mine.
ViKTOOR-LFS
5th April 2012, 15:46
;1701576']Hmm, the log file doesn't show any problems regarding the event we are talking about.
So I only have one last solution, make a RAR file of the whole Lapper directory and upload it here.
I will download that and start your Lapper on a test server of mine.
okey ..
Yisc[NL]
5th April 2012, 19:38
I have tried to find the problem in your installation of Lapper, but it is so messed up, I gave up in the end.
I have created a new installation using Lapper 6.0.1.3 with the desired functionality we have been talking about all the time.
Download and unzip it, then customize the scripts to your likings and remember, files have a specific place for a reason, you can't just move them around, merge sub-directories etc.
ViKTOOR-LFS
5th April 2012, 22:03
;1701895']I have tried to find the problem in your installation of Lapper, but it is so messed up, I gave up in the end.
I have created a new installation using Lapper 6.0.1.3 with the desired functionality we have been talking about all the time.
Download and unzip it, then customize the scripts to your likings and remember, files have a specific place for a reason, you can't just move them around, merge sub-directories etc.
im sorry to till u lfslapper u give me. not working at all !
1-Delete all files of old version
2-upload Lapper 6.0.1.3
3-unzip
4-i Edit only 2 file
LFSServers.cfg Edit
# Configuration of LFSServer to be Managed with LFSLapper
# One line per server
# Remote port is the port used to manage LFSLapper remotely, future extension
# One remote port per LFSLapper on one machine, autoStart is optionnal
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autowork
timeOutScript=2000;
remotePort=3001;
#DEF1|gr1|127.0.0.1|31993|./default|default_1.ini|autowork
^7Saudi_Arabia_Cruise|gr1|84.45.52.141|17684|./default|default_1.ini|autowork
#SAC|gr1|127.0.0.1|17684|./default|default_1.ini|autowork
default_1.ini Edit
for exp
$password = "viktoor_lfs";
No problem bro its not very important if we did not find the solution : D
I hope I did not bother you :thumbsup:
Yisc[NL]
6th April 2012, 06:09
The Lapper I gave you is a clear download from this forum, in which I only added your server name (there is no need to put the name with colour tags there, nobody will see it) and insim port number. Then I added the code needed for authorisation and tested everything on a test server. So there is no way of it not working.
*edit*
I have currently 7 LFS server with Lapper running and I've written a lof of add-ons over the years, so I think I know my way around Lapper.
I'm sorry but I have invested enough time into this now and won't help you any further.
ViKTOOR-LFS
6th April 2012, 11:00
;1701985']The Lapper I gave you is a clear download from this forum, in which I only added your server name (there is no need to put the name with colour tags there, nobody will see it) and insim port number. Then I added the code needed for authorisation and tested everything on a test server. So there is no way of it not working.
*edit*
I have currently 7 LFS server with Lapper running and I've written a lof of add-ons over the years, so I think I know my way around Lapper.
I'm sorry but I have invested enough time into this now and won't help you any further.
its okey bro
Thanks for your time
ViKTOOR-LFS
13th April 2012, 18:03
hi again
sorry guys if i'm disturbed
but yastrday my lfslapper shotdown on 500servers for no resoin !!
can anyone know what happen !!
this is my ERR.TXT
thnx & Regard .
sinanju
13th April 2012, 20:00
There appear to be a couple of issues, but the biggest seems to be a timing issue when lapper trying to save data - the error appears as
Time Out in Event or Sub 2000 ms
Yisc[NL] had this issue and found a workaround - see his post http://www.lfsforum.net/showthread.php?p=1685079#post1685079.
Basically, he amended his LFSServers.cfg file, and changed timeOutScript=2000; to timeOutScript=10000;
2000 maybe 2000 milliseconds (2 seconds)?
Rather than changing timeOutScript to 10000, change it to say 5000 and see if that gets rid of your error. If it doesn't, keep making it bigger.
PS Edit your error log, and delete everything in it, so that if you post it again, we can see only the current errors.
ViKTOOR-LFS
13th April 2012, 20:33
There appear to be a couple of issues, but the biggest seems to be a timing issue when lapper trying to save data - the error appears as
Time Out in Event or Sub 2000 ms
Yisc[NL] had this issue and found a workaround - see his post http://www.lfsforum.net/showthread.php?p=1685079#post1685079.
Basically, he amended his LFSServers.cfg file, and changed timeOutScript=2000; to timeOutScript=10000;
2000 maybe 2000 milliseconds (2 seconds)?
Rather than changing timeOutScript to 10000, change it to say 5000 and see if that gets rid of your error. If it doesn't, keep making it bigger.
PS Edit your error log, and delete everything in it, so that if you post it again, we can see only the current errors.
To be honest with you This code new steps for me :D
what u mean about timeOutScript is this on lfslapper.lpr or just i add inside the LFSServers.cfg !!
sinanju
13th April 2012, 23:01
It's part of the LFSServers.cfg script
# Configuration of LFSServer to be Managed with LFSLapper
# One line per server
# Remote port is the port used to manage LFSLapper remotely, future extension
# One remote port per LFSLapper on one machine, autoStart is optionnal
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autowork
timeOutScript=2000;
remotePort=3001;
DEF1|gr1|127.0.0.1|29999|./default|default_1.ini|autowork(Shown here as 1st line in blue)
Gai-Luron
14th April 2012, 10:30
Hello,
A timeout of 2000ms (2s) is very inportant!!!
Maybe the server on 500servers is very slow and freeze.
Maybe you have a loop without exit condition.
Very strange, i repeat 2000ms is big. Try to change it to 5000ms, but more than 5000 is not normal
Gai-Luron
ViKTOOR-LFS
15th April 2012, 08:45
It's part of the LFSServers.cfg script
# Configuration of LFSServer to be Managed with LFSLapper
# One line per server
# Remote port is the port used to manage LFSLapper remotely, future extension
# One remote port per LFSLapper on one machine, autoStart is optionnal
#Unique ID|GroupId|Ip|Port|WorkDir|IniFile|autowork
timeOutScript=2000;
remotePort=3001;
DEF1|gr1|127.0.0.1|29999|./default|default_1.ini|autowork(Shown here as 1st line in blue)
sinanju .. i try it All of these numbers 2000 & 5000 & 10000 & 20000 . Still the same problem !!
Hello,
A timeout of 2000ms (2s) is very inportant!!!
Maybe the server on 500servers is very slow and freeze.
Maybe you have a loop without exit condition.
Very strange, i repeat 2000ms is big. Try to change it to 5000ms, but more than 5000 is not normal
Gai-Luron
welcom Gai-Luron
i think its all about 500servers coz when i want to press start lfslapper its takes long time to show me Running . also when i stop it . maby takes 30 sec !! for Minimum
sinanju
15th April 2012, 11:41
You can't have 2 versions of lapper running at same time, which is what you're trying to do with one LFS server.
Stop one, and restart the other.
Unless there's something specific that you want in Krayy's V6.013, then I'd advise stopping that one, and leaving your original lapper running, as that's likely to be setup the way you want it and have developed it over last few months or so.
I would also advise that for any lapper changes you want to make, you try them on your local pc (127.0.0.1), then if you're happy everything appears to be working, then copy the amended files onto 500Servers.
ViKTOOR-LFS
18th April 2012, 16:19
You can't have 2 versions of lapper running at same time, which is what you're trying to do with one LFS server.
Stop one, and restart the other.
Unless there's something specific that you want in Krayy's V6.013, then I'd advise stopping that one, and leaving your original lapper running, as that's likely to be setup the way you want it and have developed it over last few months or so.
I would also advise that for any lapper changes you want to make, you try them on your local pc (127.0.0.1), then if you're happy everything appears to be working, then copy the amended files onto 500Servers.
i do like u say. but still not starting
i think is there proplem from 500servers.
see this email
..................
So I think I have to wait until they replay me everying is working Cleary or somthing like that .
sarxes
18th April 2012, 20:03
Hello all,
There is any way to that player couldn't use knobly tires ? If they are using they cant pit out until they change the tire to normal or super ... Like a handicap option :)
THX !
sinanju
18th April 2012, 22:22
Haven't tested it, but you could try something like
Event OnNewPlayerJoin( $userName ) # Player event
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" )
IF ($TFR == "TYRE_KNOBBLY" )
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privRcm( "You have been spectated for using ^1Knobbly ^8tyres");
privRcm( "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEvent
sarxes
18th April 2012, 22:43
Haven't tested it, but you could try something like
Event OnNewPlayerJoin( $userName ) # Player event
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" )
IF ($TFR == "TYRE_KNOBBLY" )
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privRcm( "You have been spectated for using ^1Knobbly ^8tyres");
privRcm( "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEvent
I added but it's doesnt work ... :S
sinanju
18th April 2012, 22:54
Just noticed that I missed a semi-colon at the end of a line - should be
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" );
Amended code:
Event OnNewPlayerJoin( $userName ) # Player event
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" );
IF ($TFR == "TYRE_KNOBBLY" )
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privRcm( "You have been spectated for using ^1Knobbly ^8tyres");
privRcm( "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEvent
sarxes
19th April 2012, 12:48
My code looks like is !
##########################################
#New PLayer joining race or leaving pits)#
##########################################
Event OnNewPlayerJoin( $userName ) # Player event
openPrivButton( "label_lfslogo",147,25,60,5,1,-1,0,langEngine( "%{label_lfslogo}%" ));
openPrivButton( "label_logo",165,12,30,14,1,-1,128,langEngine( "%{label_logo}%" ));
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" );
$TFL = ( GetCurrentPlayerVar( "TyreFrontLeft" );
$TRR = ( GetCurrentPlayerVar( "TyreRearRight" );
$TRL = ( GetCurrentPlayerVar( "TyreRearLeft" );
IF ($TFR == "TYRE_KNOBBLY" )
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privRcm( "You have been spectated for using ^1Knobbly ^8tyres");
privRcm( "Please change to ^4Normal ^8or ^4Super ^8tyres" );
IF ($TFL == "TYRE_KNOBBLY" )
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privRcm( "You have been spectated for using ^1Knobbly ^8tyres");
privRcm( "Please change to ^4Normal ^8or ^4Super ^8tyres" );
IF ($TRR == "TYRE_KNOBBLY" )
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privRcm( "You have been spectated for using ^1Knobbly ^8tyres");
privRcm( "Please change to ^4Normal ^8or ^4Super ^8tyres" );
IF ($TRL == "TYRE_KNOBBLY" )
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
privRcm( "You have been spectated for using ^1Knobbly ^8tyres");
privRcm( "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEvent
Do you see any problem ?
Yisc[NL]
19th April 2012, 14:28
An IF statement always have to end with ENDIF
So you are basicly missing 3 ENDIFs
sarxes
19th April 2012, 15:36
;1705640']An IF statement always have to end with ENDIF
So you are basicly missing 3 ENDIFs
Im added but noting ....
Yisc[NL]
19th April 2012, 16:34
What have you done to debug your code?
Have you tried to see if $TFR etc do have a value by echoing them on the console or in the LFS chat?
If they have a value, have you checked that you really go into an IF-statement?
sinanju
19th April 2012, 18:28
I've been doing some testing with the following;
Event OnExitPitLane( $userName ) # Player event
$OTFR = ( GetCurrentPlayerVar( "OldTyreRearRight" );
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" );
openPrivButton( "otfr",50,25,100,15,5,8,32, "^1Pre IF statement: OLD tyres being used at front are: ",GetCurrentPlayerVar("OldTyreRearRight"));
openPrivButton( "tfr",50,50,100,15,5,8,32, "^1Pre IF statement: NEW tyres being used at front are: ",GetCurrentPlayerVar("TyreRearRight")
IF ($TFR == "TYRE_KNOBBLY" )
THEN
openPrivButton( "otfr",50,75,100,15,5,8,32, "IF statement: OLD tyres being used at front are: " . $OTFR);
openPrivButton( "tfr",50,100,100,15,5,8,32, "IF statement: NEW tyres being used at front are: " . $TFR);
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "tyrespec",50,125,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,150,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEvent
I changed the EVENT from OnNewPlayerJoin to OnExitPitLane, and changed prvMsg to openPrivButton.
Some of the code is working, but some just doesn't output as you would expect, but it does spec you if you leave pit lane with Knobbly tyres.
See image for on screen messages.
If you change code to something like
Event OnExitPitLane( $userName ) # Player event
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" );
IF ($TFR == "TYRE_KNOBBLY" )
THEN
openPrivButton( "tyrespec",50,125,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,150,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
ENDIF
EndEvent
it may work.
By the by; when you change tyres, you change front left/right and rear left/right as pairs, so you don't need so many IF statements. Just pick one front wheel and one back wheel and code should still work.
Haven't tested code in different EVENTS, so may work in OnNewPlayerJoin if changing to outputting text on buttons.
sinanju
20th April 2012, 08:52
...or you could something like....
Event On.........
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" );
$TFL = ( GetCurrentPlayerVar( "TyreFrontLeft" );
$TRR = ( GetCurrentPlayerVar( "TyreRearRight" );
$TRL = ( GetCurrentPlayerVar( "TyreRearLeft" );
IF (($TFR == "TYRE_KNOBBLY" ) || ($TFL == "TYRE_KNOBBLY" ) || ($TRR == "TYRE_KNOBBLY" ) || ($TRL == "TYRE_KNOBBLY" ))
THEN
openPrivButton( "tyrespec",50,50,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,70,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
ENDIF
EndEvent
sarxes
20th April 2012, 22:18
...or you could something like....
Event On.........
$TFR = ( GetCurrentPlayerVar( "TyreFrontRight" );
$TFL = ( GetCurrentPlayerVar( "TyreFrontLeft" );
$TRR = ( GetCurrentPlayerVar( "TyreRearRight" );
$TRL = ( GetCurrentPlayerVar( "TyreRearLeft" );
IF (($TFR == "TYRE_KNOBBLY" ) || ($TFL == "TYRE_KNOBBLY" ) || ($TRR == "TYRE_KNOBBLY" ) || ($TRL == "TYRE_KNOBBLY" ))
THEN
openPrivButton( "tyrespec",50,50,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,70,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
ENDIF
EndEvent
Sin, i dont want to be rubbish, but i tried with on connect on leavepit and not working for me ... :S
ViKTOOR-LFS
22nd April 2012, 13:00
Knobbly tyres for FTW :banana::sadbanana:banana::drink:
sarxes
22nd April 2012, 16:00
Knobbly tyres for FTW :banana::sadbanana:banana::drink:
What you mean under FTW ? I have to change to this ?
sinanju
22nd April 2012, 23:08
Sin, i dont want to be rubbish, but i tried with on connect on leavepit and not working for me ... :S
I've been doing some testing, and it seems like code will only work if you change it to old tyres!
Try
Event OnExitPitLane( $userName ) # Player event
$OTFR = GetCurrentPlayerVar( "OldTyreFrontRight" );
$OTRR = GetCurrentPlayerVar( "OldTyreRearRight" );
$TFR = GetCurrentPlayerVar( "TyreFrontRight" );
$TRR = GetCurrentPlayerVar( "TyreRearRight" );
IF (($OTRR == "TYRE_KNOBBLY" ) || ($OTFR == "TYRE_KNOBBLY" ) || ($TRR == "TYRE_KNOBBLY" ) || ($TFR == "TYRE_KNOBBLY" ))
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "tyrespec",50,35,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,50,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEventAs you can see, I've only chosed 1 tyre for front and rear, and I've also added $TFR and $TRR - this is incase someone already on track with correct tyres comes into pits and changes to knobbly tyres - this bit not tested as I haven't had time.
Let me know how you get on.
ViKTOOR-LFS
23rd April 2012, 09:48
What you mean under FTW ? I have to change to this ?
I'm kidding with you xD & i dont know why im saying this :Looking_a
coz we useing Knobbly tyre for drifting in or server.
I know that he is not the place to speak at these things on this Thread
sorry for interrupting you
Peace
sarxes
24th April 2012, 17:36
I've been doing some testing, and it seems like code will only work if you change it to old tyres!
Try
Event OnExitPitLane( $userName ) # Player event
$OTFR = GetCurrentPlayerVar( "OldTyreFrontRight" );
$OTRR = GetCurrentPlayerVar( "OldTyreRearRight" );
$TFR = GetCurrentPlayerVar( "TyreFrontRight" );
$TRR = GetCurrentPlayerVar( "TyreRearRight" );
IF (($OTRR == "TYRE_KNOBBLY" ) || ($OTFR == "TYRE_KNOBBLY" ) || ($TRR == "TYRE_KNOBBLY" ) || ($TFR == "TYRE_KNOBBLY" ))
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "tyrespec",50,35,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,50,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEventAs you can see, I've only chosed 1 tyre for front and rear, and I've also added $TFR and $TRR - this is incase someone already on track with correct tyres comes into pits and changes to knobbly tyres - this bit not tested as I haven't had time.
Let me know how you get on.
Nothing happening ... :shrug:
sinanju
24th April 2012, 18:55
I've just reloaded that code again on my lapper version 6.013 and it's still working for me - see YouTube video HERE (http://youtu.be/5k60tcV_JmM).
Note that it takes about 3 seconds after passing pit exit before you get spec'd.
This code should probably work in V5.825 and onwards according to lapper changes document.
sarxes
24th April 2012, 19:20
I've just reloaded that code again on my lapper version 6.013 and it's still working for me - see YouTube video HERE (http://youtu.be/5k60tcV_JmM).
Note that it takes about 3 seconds after passing pit exit before you get spec'd.
This code should probably work in V5.825 and onwards according to lapper changes document.
ThX for the vid, but what about in autocross ? There is a pitlane ?
sinanju
24th April 2012, 20:22
Try in a different Event, like;
Event OnNewPlayerJoin( $userName ) # Player event
$OTFR = GetCurrentPlayerVar( "OldTyreFrontRight" );
$OTRR = GetCurrentPlayerVar( "OldTyreRearRight" );
$TFR = GetCurrentPlayerVar( "TyreFrontRight" );
$TRR = GetCurrentPlayerVar( "TyreRearRight" );
IF (($OTRR == "TYRE_KNOBBLY" ) || ($OTFR == "TYRE_KNOBBLY" ) || ($TRR == "TYRE_KNOBBLY" ) || ($TFR == "TYRE_KNOBBLY" ))
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "tyrespec",50,35,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,50,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEvent
sarxes
24th April 2012, 21:44
Try in a different Event, like;
Event OnNewPlayerJoin( $userName ) # Player event
$OTFR = GetCurrentPlayerVar( "OldTyreFrontRight" );
$OTRR = GetCurrentPlayerVar( "OldTyreRearRight" );
$TFR = GetCurrentPlayerVar( "TyreFrontRight" );
$TRR = GetCurrentPlayerVar( "TyreRearRight" );
IF (($OTRR == "TYRE_KNOBBLY" ) || ($OTFR == "TYRE_KNOBBLY" ) || ($TRR == "TYRE_KNOBBLY" ) || ($TFR == "TYRE_KNOBBLY" ))
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "tyrespec",50,35,100,15,5,8,32, "You have been spectated for using ^1Knobbly ^8tyres");
openPrivButton( "tyrechange",50,50,100,15,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres" );
ENDIF
EndEvent
Sure that your code is working because you are a genius but i tried with another event like onsplit1 and for autocross its not working ... :S
sinanju
25th April 2012, 09:22
Sure that your code is working ... but i tried with another event like onsplit1 and for autocross its not working ... :S
But it will work for Event OnLap( $userName ).
Testing, the best I can see for you would be
$distToDo = 10;
Event OnDistDone( $userName ) # Player event
$OTFR = GetCurrentPlayerVar( "OldTyreFrontRight" );
$OTRR = GetCurrentPlayerVar( "OldTyreRearRight" );
$TFR = GetCurrentPlayerVar( "TyreFrontRight" );
$TRR = GetCurrentPlayerVar( "TyreRearRight" );
IF (($OTRR == "TYRE_KNOBBLY" ) || ($OTFR == "TYRE_KNOBBLY" ) || ($TRR == "TYRE_KNOBBLY" ) || ($TFR == "TYRE_KNOBBLY" ))
THEN
cmdLFS( "/spec " . GetCurrentPlayerVar("UserName") );
openPrivButton( "tyrespec",50,35,100,12,10,8,32, "Sorry, but you have been spectated for using ^1Knobbly ^8tyres.%nl%Knobbly tyres are not allowed on this particular layout.");
openPrivButton( "tyrechange",50,55,100,12,5,8,32, "Please change to ^4Normal ^8or ^4Super ^8tyres%at%^4Please change to ^8Normal ^4or ^8Super ^4tyres" );
ENDIF
EndEventAbove code has set $distToDo to 10m, but you can change to suit.
sarxes
25th April 2012, 09:44
But it will work for Event OnLap( $userName ).
Testing, the best I can see for you would be
EndEvent[/PHP]Above code has set $distToDo to 10m, but you can change to suit.
Awesome ! why i havent this idea ... :P Thank you very much , now i can take a rest ! Cheers !
sarxes
26th April 2012, 11:59
The code is working great but it has an error. The reason is that if I use knobly tyre and Im spectated for this after changing to normal tyres the lapper spectate me too for knobly tyres. But how ? Normal is not = with knobly tyres !
sinanju
27th April 2012, 10:03
The code is working great but it has an error. The reason is that if I use knobly tyre and Im spectated for this after changing to normal tyres the lapper spectate me too for knobly tyres. But how ? Normal is not = with knobly tyres !
Don't know why that happens, but I can confirm that it does!
Keeping your original coding, try adding the following additional code to your Event OnNewPlayerJoin( $userName ) # Player event section;
$OTFR = GetCurrentPlayerVar( "OldTyreFrontRight" ); SetCurrentPlayerVar("OldTyreFrontRight",$OTFR);
$OTRR = GetCurrentPlayerVar( "OldTyreRearRight" ); SetCurrentPlayerVar("OldTyreRearRight",$OTRR);
$TFR = GetCurrentPlayerVar( "TyreFrontRight" ); SetCurrentPlayerVar("TyreFrontRight",$TFR);
$TRR = GetCurrentPlayerVar( "TyreRearRight" ); SetCurrentPlayerVar("TyreRearRight",$TRR);
Basically, it's getting lapper to set in its memory what the tyres are at the start of a race or when leaving pits, but then after a certain distance (defined in your $distToDo), lapper looks what it has in its memory and acts accordingly.
Weird, as not sure why tyres should need to be set beforehand as you're only getting lapper to look up '(get') the information supplied by LFS.
sarxes
27th April 2012, 13:03
THX mate, this solved my problem ! :)
sarxes
9th May 2012, 14:43
I cant make workable this method.
$DriftPB = GetCurrentPlayerVar("PBDrift");
main_welc3 = "^7Your highest Drift Score (with this vehicle): ^2{0}";
$DefaultTopCar = "XRG+XRT+LX4+FXO+FZ5";
openPrivButton( "ref",40,110,120,10,8,-1,ISB_DARK,langEngine("%{main_welc3}%",$DriftPB ));
All is set but at the welcome doent shows the score just 0 !
P.S.: I dont know why but the lapper close this 4 name of button
closePrivButton("welc&pos&clos&ref");
If i rename ex. the ref to ref1 and i modify in closepriv. doesnt close the button. There is any exception of closing buttons o.O ?
Krayy
10th May 2012, 04:25
My immediate guess here is that as the user is a new connection, it has not registered that they have chsoen a car yet.
To test this out, write a short test command to do your code to the chat window using privMsg
sarxes
19th May 2012, 10:45
There is any way to disable voting to restart, end or qualify ?
sinanju
20th May 2012, 07:47
You don't need to do it via LFSLapper as it can be done via LFS Host command -
/vote X (where X = yes or no)
This is the command that allows / disallows guest voting.
LFS Host commands can be found HERE (http://www.lfs.net/host.htm)
sarxes
23rd May 2012, 19:47
How to make the command that if someone go in a restricted area after its automaticaly pitlane the driver ...
sinanju
23rd May 2012, 21:40
How to make the command that if someone go in a restricted area after its automaticaly pitlane the driver ...
In 2 parts -
1st, set a zone (your area) that when entered triggers a sub-routine, e.g.
RegisterZoneAction( "NoEntryArea", "AU1" , -100, 100 , 5 , SR_PitDriver );
(this would cause an area 5m x 5m to be a 'trigger' point- make the 5 bigger or smaller to suit, or, alternatively, have multiple RegisterZoneActions with different locations but the same sub-routine)
2nd, your sub-routine - e.g.
Sub SR_PitDriver( $userName ) # Player event
privMsg( "You have been pitted for entering a restricted area.";
cmdLFS("/pitlane " . GetCurrentPlayerVar("UserName") );
EndSub
sarxes
23rd May 2012, 21:48
Without making a register zone its not possible ? Lapper cant recognize the restricted area made by LFS in layout build ? :shrug:
sinanju
23rd May 2012, 22:42
Zones exist in the AutoX layout, but not Nodes.
Type !zone and !node in your layout to see what numbers you get.
sarxes
24th May 2012, 10:46
Zones exist in the AutoX layout, but not Nodes.
Type !zone and !node in your layout to see what numbers you get.
I mean the LFS restricted area created by LFS developers not by lapper !
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.