The online racing simulator
Racepoints system wanted
hi everyone
can someone help me with making a Racepoints system
example.
u earn 10 points when u came 1st over the finish (race with 10 people)
Quote from Bass-Driver :hi everyone
can someone help me with making a Racepoints system
example.
u earn 10 points when u came 1st over the finish (race with 10 people)

i got it but timNL told me not to release it
#3 - Krayy
I'm working on a complex one which won't be ready for a week or so, but until then, add a SWITCH/CASE statement in the LFSLapper.lpr file in the OnResult function like this here:

Event OnResult( $flagConfirm )
writeline ( langEngine( "%{main_on_result}%" ,GetCurrentPlayerVar("FinishedPos") ) );
SWITCH(GetCurrentPlayerVar("FinishedPos") )
CASE "1":
globalMsg(GetCurrentPlayerVar( "NickName" . "gets 10 points")
BREAK;
CASE "2":
globalMsg(GetCurrentPlayerVar( "NickName" . "gets 9 points")
BREAK;
etc...
ENDSWITCH
EndEvent

The problem here is that you need to change iit by hand if your points system chnages. I'll address that in the complex one, and allow you to write the results out to a file. We're going to use XML to allow imports into a stats web site.
Everybody wants a racepoint system.

@any programmer: How much money do You want?
#5 - Krayy
Quote from lysergic :Everybody wants a racepoint system.

@any programmer: How much money do You want?

Just 'cos you asked nicely, I'll do it for free

Watch this space...but not too closely or you'll go blind.
Quote from lysergic :Everybody wants a racepoint system.

@any programmer: How much money do You want?

Hi,

I dont want money , but here is a point system for 12 players if you want more its not so hard to expand.

With !rank and !point you can see your points.

Copy the folling parts into your lfslapper.lpr and have have a point system in lapper ( works not in ver 5.716 only in 5.841 or higher)

Its the same as on [NLR]NL Racing Copper (Demo FBM BL1) only have i there added a Licence system to.
On [NLR]NL Racing Test i have a bit diffent layout ( smaller letter ).

Have fun with....
Attached files
PointSystem.zip - 1.3 KB - 459 views
Thanks! I'll try it, but before I have to switch to the last version of the lapper.

I'm using version 5.716 because I read pb.txt file, showing it on the website, and importing it in mysql db to list users admitted to the race (every wednesday) according to race subscriptions (qualusers), number of laps, and laptimes.

These are the results on FRL site:
all laptimes on server: http://www.funracingleague.com/results/pre-qualify

user qualified (for today race, here): http://www.funracingleague.com/qual/lapperview/mega2.php

All scripts are semi-automatic, I've to change only track and car values.

I'm not a php programmer and all these scripts were done with a lot of google and cut/paste
Hi,
All points are stored in the SQL database . ( storedvalue.dbs Tabel fi_user_value )
With some small changes you can also use this to setup events.
If you use for every race a different racenumber in a var ( exaple $racenumber ) ,you can show points results per race and show the total results points.


setUserStoredValue( "S2009_" . $racenumber, GetCurrentPlayerVar( "S2009_" . $racenumber" ) ); #Store data in database

topUser( "Season 2009 Race:" . $racenumber,"S2009_" . $racenumber,"DESC",argv ); # Shows the results for race x ( $racenumber )
topUser( "Season 2009 Total points","S2009_","DESC",argv ); # Shows the total results for S2009_
Quote from Tim NL :Hi,

I dont want money , but here is a point system for 12 players if you want more its not so hard to expand.

With !rank and !point you can see your points.

Copy the folling parts into your lfslapper.lpr and have have a point system in lapper ( works not in ver 5.716 only in 5.841 or higher)

Its the same as on [NLR]NL Racing Copper (Demo FBM BL1) only have i there added a Licence system to.
On [NLR]NL Racing Test i have a bit diffent layout ( smaller letter ).

Have fun with....

I'm getting this error in the LFSLapper logs: 9/17/2009 2:27:49 PM -> Syntax error in cfg file Need a item identification on file : "LFSLapper.lpr" at line #1973

LFSLapper.lpr line #1973

GlobalVar $point_L ;
Quote from erfrag :I'm getting this error in the LFSLapper logs: 9/17/2009 2:27:49 PM -> Syntax error in cfg file Need a item identification on file : "LFSLapper.lpr" at line #1973

LFSLapper.lpr line #1973

GlobalVar $point_L ;

Looks like you didn't copied the var's in your script or they are on the wrong place in the script.

###################################
#Event triggered when lapper start#
###################################
Event OnLapperStart()

GlobalVar $point_L ;
GlobalVar $point_T ;
GlobalVar $ps_max_points;
$point_L = 75 ;
$point_T = 5 ;
$ps_max_points=10;

Or post your LFSLapper.lpr so we can look at it.
restarting lapper seemed to fix the problem, something must have not loaded correctly.
Quote from Tim NL :Looks like you didn't copied the var's in your script or they are on the wrong place in the script.

###################################
#Event triggered when lapper start#
###################################
Event OnLapperStart()

GlobalVar $point_L ;
GlobalVar $point_T ;
GlobalVar $ps_max_points;
$point_L = 75 ;
$point_T = 5 ;
$ps_max_points=10;

Or post your LFSLapper.lpr so we can look at it.

actually u made abug :S or it said it was a bug



<?php 
###################################
#Event triggered when lapper start#
###################################
Event OnLapperStart()
 
 
GlobalVar $point_L;
  
GlobalVar $point_T;
  
GlobalVar $ps_max_points;           
   
$point_L 75;
   
$point_T 5;
   
$ps_max_points=10
?>

Quote from Tim NL :Hi,
All points are stored in the SQL database . ( storedvalue.dbs Tabel fi_user_value )
With some small changes you can also use this to setup events.
If you use for every race a different racenumber in a var ( exaple $racenumber ) ,you can show points results per race and show the total results points.


setUserStoredValue( "S2009_" . $racenumber, GetCurrentPlayerVar( "S2009_" . $racenumber" ) ); #Store data in database

topUser( "Season 2009 Race:" . $racenumber,"S2009_" . $racenumber,"DESC",argv ); # Shows the results for race x ( $racenumber )
topUser( "Season 2009 Total points","S2009_","DESC",argv ); # Shows the total results for S2009_



too difficult for my knowledge

bad thing feeling ignorant
Quote from Bass-Driver :hi everyone
can someone help me with making a Racepoints system
example.
u earn 10 points when u came 1st over the finish (race with 10 people)

Try Free Airio
fail
Syntax error in cfg file line GlobalVar Char GlobalVar on file : "LFSLapper.lpr" at line #1839

Line 1839:
GlobalVar $point_L;
I paste Your code at bottom of LFSLapper.lpr in default dir
Quote from lysergic :
Syntax error in cfg file line GlobalVar Char GlobalVar on file : "LFSLapper.lpr" at line #1839

Line 1839:
GlobalVar $point_L;
I paste Your code at bottom of LFSLapper.lpr in default dir

Hi,
Try this LFSLapper.lpr, its just a default file ( ver 5.845) with the point system allready in it.
Attached files
LFSLapper.zip - 17.5 KB - 361 views

9/20/2009 12:58:07 AM -> Param var $MaxCarResets do on file : "LFSLapper.lpr" at line #1597
9/20/2009 12:58:12 AM -> Syntax error in cfg file "LFSLapper.lpr" at line #333
'initaddons' is not a Lapper function
Function 'onlapperstart' script aborted

500server version is 5.843 not 5.845
Quote from lysergic :

9/20/2009 12:58:07 AM -> Param var $MaxCarResets do on file : "LFSLapper.lpr" at line #1597
9/20/2009 12:58:12 AM -> Syntax error in cfg file "LFSLapper.lpr" at line #333
'initaddons' is not a Lapper function
Function 'onlapperstart' script aborted

500server version is 5.843 not 5.845

The initaddons function is defined in an external file called addonsused.lpr. Make sure that the following line is in the Lapper config file where the other includes are:

include( "./includes/addonsused.lpr");

Hi guyz, I really appreciate your help, but it gives me again the same error.

Is it a version problem?

addonsused.lpr content:

Sub initAddons()
$enable_pitboard="true"; #Set value to "false" if you don't want to use the Pitboard
$enable_pitwindow_gui="true"; #Set value to "false" if you don't want to use the Pitwindow GUI
$enable_safetycar_gui="true"; #Set value to "false" if you don't want to use the Safetycar GUI
$enable_ctrack_gui="true"; #Set value to "false" if you don't want to use the Ctrack GUI
$enable_config_gui="true"; #Set value to "false" if you don't want to use the GUI Config
EndSub

Configured on another server ([url="lfs://|[FRL]+short+races|0|S2|/"][FRL] short races 5.8.4.6[/url] ), works perfectly.
But.. I dont understand how points system works: I need to assign points to first 15 drivers (50,40,32,26,22,20,18,16,14,12,10,8,6,4,2), is it possible? How?
Hi Tim,

Do you have a 5.846 compatible version.
I tried to implement it but I make me only the end board working with no save and all lapper functions down.

I must be very bad in copy/paste.

Thanks
should work 1works for me :|
Yes it should

Anyway, I found my issue an extra "switch" in the on lapper start event.

Thanks.
Hello Loco my friend!

i see you are working with new LFSLapper! Great!

See you later on msn or Team Speak.


Bye

FGED GREDG RDFGDR GSFDG