The online racing simulator
Searching in All forums
(966 results)
Gai-Luron
S3 licensed
Hello,

I apply your modification on SVN repository. Get the freshen file. I Add a new config Var

Quote :Add $AdminFile in LFSLapper.lpr file to specify what file is used
for UserIsAdmin function


<?php 
#################
#General options#
#################

$AdminFile "./admin.txt"# Name of the file containing admin lfsname player
...
?>


Thank you

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
  1. Insert a temporary username in your mysql table DBS containing qualification user with username like this : DefGroup:3;20;13
  2. then make your sql statement including this row to create file
  3. then erase this row
DefGroup:3;20;13 can be in any line of your qual user file. It's not an obligation to put it in the first line

or better use UNION ( search word on google : "header INTO OUTFILE" )

Here an example

SELECT 'DefGroup:3;20;13'
UNION
SELECT username INTO OUTFILE 'qualuser.txt'
FROM yourTable
WHERE yourquery

Gai-Luron
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Quote from lysergic :Hi, is it possible to define qual groups also if I define qual users from a file?

$RefreshQualUsers = true;
$QualUsers = "&./qualusers2009.txt";
#$QualUsers = "@DefGroup:2:32:1,Lysergic,.....

May I write:
$QualUsers = ""@DefGroup:2:32:1,&./qualusers2009.txt";


Many thanks!

you must define @DefGroup:2:32:1 in qualusers2009.txt. This must be done in first line of the file

example in file :

Quote :
DefGroup:3;20;13
lysergic
gai-luron
....

Gai-Luron
Gai-Luron
S3 licensed
What's your's LFSServers.cfg file look? Because the error it's tipically due to this RemotePort conflict
Gai-Luron
S3 licensed
Hello,

if you run more than one LFSLapper ( it's better to run one ) put a different
remotePort for each LFSLapper on same computer

remotePort
=3001;

remotePort=3002;
etc...
Need Help
Gai-Luron
S3 licensed
Hello,

LFSLapper need help for this polling ^^

Go and view thread : http://www.lfsforum.net/showthread.php?p=1126263#post1126263

Gai-Luron
Gai-Luron
S3 licensed
Hello,

Release 5.8.4.5 avaiable
Quote :
+-------------------------------+
|Changes from v5.844 to 5.845 |
+-------------------------------+
Add Krayy code

1 Add 1 lapperVar var
raceMins = Race in minute pour timed races
numConns = Number of player connected
numPlayers = Number of player on track

getLapperVar( "raceMins" );

2 Add 1 player var
pitStops = Number of pitstop do by a player

GetCurrentPlayerVar("pitStops");
or
GetPlayerVar("nickane","pitStops");

3 Add new GLScritp file "who.lpr". it work with connected.lpr and add
a new command for player
!who -> display player connected

4 Add new GLScritp file "handicapper.lpr". it work with connected.lpr
Allow an admin to assign, save and load handicaps in-race
a new command for player and admin
!hc -> display player connected

SVN repositary updated
Gai-Luron
S3 licensed
Yes "paragraph" ( better to say block ) only excecute when condition is true in THEN part or false in ELSE part. And block are delimited into IF condition THEN ... ELSE ... ENDIF. unlimited imbrication can be done. to have better reading it's good to indent your code to better view every blocks. ELSE block is optionnal


[COLOR="Red"]IF condition1
THEN[/COLOR]
[COLOR="Lime"] IF condition2 THEN[/COLOR]
[COLOR="Blue"]IF condition3 THEN[/COLOR]
...
[COLOR="Blue"] ELSE[/COLOR]
[COLOR="cyan"] IF condition4 THEN[/COLOR]
...
[COLOR="cyan"]ENDIF[/COLOR]
[COLOR="Blue"]ENDIF[/COLOR]
[COLOR="Lime"] ENDIF[/COLOR]
[COLOR="Red"]ELSE[/COLOR]
...
[COLOR="Red"]ENDIF[/COLOR]

For your next issue

With this syntax you have every second for one mn your message

RegisterScheduleAction( "* 00 * * * * * : * 15 * * * * * : * 30 * * * * * : * 45 * * * * *", SA_webad );

* 00 * * * * *
mean at * second ( every number of second. * mean every when used in any position) when minute is 00 do the action.

The good syntax is

RegisterScheduleAction( "0 00 * * * * * : 0 15 * * * * * : 0 30 * * * * * : 0 45 * * * * *", SA_webad );

0 00 * * * * *
mean at 0 second when minute is 0 do action. Action is done one shoot because there is only one 0 second at 0 mn or 0 second at 15 mn etc...

example
0 30 * * * * *
in extenso : at 0 second,30 minute, every hour, every day of week, every day, every month, every year

if you want display a message only the 25 december of every year at 0 hours, 0 minute, zero second
0 0 0 * 25 12 *


i know GLScript is a little bit complicated than standard config file ( like AIRIO ), but much powerfull if you try to understand how it work. Continue!
most script exist for lapper, better is
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Every IF must be close with ENDIF.

But your version can't work because they need an ENDIF and also because there is a logic mistake.
if tirst test is true, you are an admin and you go in THEN clause. But if you are admin it's not an obligation to be an half admin. Second test is wrong. /restart is never executed.

Complicated version


IF( UserInGroup( "admin",$userName ) == 1 )
THEN
cmdlfs( "/restart" );
ELSE
IF( UserInGroup( "halfadmin",$userName ) == 1 )
THEN
cmdlfs( "/restart" );
ELSE
privMsg( langEngine( "%{main_notadmin}%" ) );
ENDIF
ENDIF

BREAK;

In this version, if you are an admin you do only the THEN part to ELSE and exit to the corresponding ENDIF


THEN
cmdlfs( "/restart" );
ELSE
....
ENDIF

if you aren't and admin GLScript execute ELSE to his ENDIF. in this case



IF ....
....
ELSE
IF( UserInGroup( "halfadmin",$userName ) == 1 )
THEN
cmdlfs( "/restart" );
ELSE
privMsg( langEngine( "%{main_notadmin}%" ) );
ENDIF
ENDIF

in this part of code you aren't and admin and you test if you are an halfadmin. if true execute

THEN
cmdlfs( "/restart" );
ELSE

if false execute

ELSE
privMsg( langEngine( "%{main_notadmin}%" ) );
ENDIF

then exit from the main if. i hope i'am clear


More easy version


IF( UserInGroup( "admin",$userName ) == 1 || UserInGroup( "halfadmin",$userName ) == 1)
THEN
cmdlfs( "/restart" );
ELSE
privMsg( langEngine( "%{main_notadmin}%" ) );
ENDIF
BREAK;

|| it's or condition
&& it's and condition
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Wrong ascii double quote in this line, rigth to drf2

Quote :
openPrivButton( "drf2”,100,6,20,4,4,-1,32,langEngine( "%{main_driftangle}%" , $AngleVelocity ) ;

Good

Quote :
openPrivButton( "drf2",100,6,20,4,4,-1,32,langEngine( "%{main_driftangle}%" , $AngleVelocity ) ) ;


Do you use pspPad editor? try it. it's good to view unmatched ( or "

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

Great!

onIdleExclude was created before UserGroup, it's for this on idle exclude exist. But now it's easy to do with usergroup. You become a GLScript coder

Gai-Luron
Gai-Luron
S3 licensed
You are so complicated if negative


$toto = -1; #any negative number
IF( $toto < 0 )
THEN
$toto = -$toto;
ENDIF


"Angle_drift" don't exist as builtin var in LFSLapper


and

SetCurrentPlayerVar($Angle_drift,"AngleVelocity*(-1)");
wrong

Correct is

SetCurrentPlayerVar("Angle_drift",$AngleVelocity);

if $AngleVelocity is set ^^

example

$AngleVelocity = GetCurrentPlayerVar( "AngleVelocity" );
IF( $AngleVelocity < 0 )
THEN
$AngleVelocity = -$AngleVelocity ;
ENDIF
SetCurrentPlayerVar("Angle_drift",$AngleVelocity);

To retreive Angle_drift var, you have to write
$retreiveiVar = GetCurrentPlayerVar( "Angle_drift" );


$myvar is a GLScript Var, everytime preceded with $

GetCurrentPlayerVar( idOfVar ) is a function to get internal player var, idOfVar is a string containing the id of the internal var without $
SetCurrentPlayerVar( idOfVar,value ) is a function to set internal player var ( not the builtin var, only new var ), idOfVar is a string containing the id of the internal var without $ and value is any value, string or numerical

, if i have time to write a doc, it will be better. Maybe in Setember
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Quote from sinanju :Hi Yisc{NL]

I emptied the large log file, and re-run with drift on. Did this a few times.

Log file attached.

It says error on line #2262

My Lapper.lpr file has no line spaces in it, so using PSPad, line #2262 is:

main_split1 = "^7SP1: {0} {1}({2})&^7TPB:{3}";

However, that line is not much different to next 2 lines:

main_split2 = "^7SP2: {0} {1}({2})&^7TPB:{3}";
main_split3 = "^7SP3: {0} {1}({2})&^7TPB:{3}";


Doesn't make much sense, unless line numbering is wrong somewhere.

Wich version of LFSLapper? i correct some thing in error numbering. If it's the last please send me your lpr file

thank's



for Tur8o, i take a look on iddle exclude, try to put all username in lowercase

Gai-Luron
Gai-Luron
S3 licensed
Work only with username, no nickname
Gai-Luron
S3 licensed
Hello,

The problem is that AI have same username as you, and PB are stored relative to username and no nickname


Gai-Luron
Gai-Luron
S3 licensed
Hello,

You use an old lfslapper.lpr. In the last release the script is good

Gai-Luron

to Tim NL: Change the firts post when you do a new release. I referenced your script in script database
Last edited by Gai-Luron, .
Gai-Luron
S3 licensed
Hello,

Release 5.8.4.4 avaiable

Quote :+-------------------------------+
|Changes from v5.843 to 5.844 |
+-------------------------------+
1. Add Krayy car reset code in LFSLapper
new events
Event OnMaxCarResets() : triggered when MaxCarResets is reached by a player
Event OnCarReset() : triggered when player do a car reset

New param var
MaxCarResets = #;
# number of allowed car reset before triggering OnMaxCarResets

2 Add 3 lapperVar var
RaceLaps = number or laps for a race
QalMins = number or minute in a qual
racelapsleft = Race lap left before end of race

getLapperVar( "RaceLaps" );
or
getLapperVar( "QalMins" );

3 Add updated GUI script From Tim

Gai-Luron
S3 licensed
Great!

Please change your code in FSLapper.lpr file this this one


Please for next patch on LFSLapper use svn repository at

https://sourceforge.net/projects/lfslapper/

and tortoise SVN

Thank's

############################
#Actions to do on Car Reset#
############################

$MaxCarResets = 5; # Set to a positive number to limit number of race resets

Event OnMaxCarResets() # Spectate if player has used car reset more than the max
globalMsg( langEngine( "%{main_maxreset}%" , GetCurrentPlayerVar( "NickName" ) ) );
cmdLFS( "/spec " . GetCurrentPlayerVar( "Username" ) );
EndEvent

Event OnCarReset() # Do something when the car resets
globalMsg( langEngine( "%{main_oncarreset}%", GetCurrentPlayerVar( "NickName" ),GetCurrentPlayerVar( "LapsDone" )+1 ));
IF( $ConfVar["MaxCarResets"] > 0 )
THEN
openPrivButton( "carres_warn",50,60,100,15,5,4,16, langEngine( "%{main_specwarn}%" ) );
openPrivButton( "carres_msg1",50,75,100,10,5,4,16,langEngine( "%{main_resetrest}%",$ConfVar["MaxCarResets"] - GetCurrentPlayerVar( "NumCarResets" )));
privdelayedcommand( 4, ApplyCarResetPenalty);
ELSE
privdelayedcommand( 1, ApplyCarResetPenalty);
ENDIF
EndEvent

Lang "EN"
...

main_maxreset = "{0} spectated for exceeding max car resets";
main_oncarreset = "Car Reset by {0} on lap {1}";
main_specwarn = "^1Spectate Warning";
main_resetrest = "^2You have^3 {0} ^2car resets left";
...
EndLang

Lang "FR"
...
main_maxreset = "{0} mis en spectateur pour excès de reset de voiture";
main_oncarreset = "Reset de voiture par {0} au tour {1}";
main_specwarn = "^1Attention mise en spectateur";
main_resetrest = "^2Il vous reste^3 {0} ^2reset de voiture";
...
EndLang


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

Can you explicit where exactly the bug

Thank's


Gai-Luron
Gai-Luron
S3 licensed
Coordonate of pit windows or pitboard overlap i think. Try to start with a fresh config
Gai-Luron
S3 licensed
Do you have your base created. Extension is .dbs. If yes, do you have set the default car with your current car

Gai-Luron
Gai-Luron
S3 licensed
Hello,

Mono.Data.SqliteClient.dll won't work in Vista. I am not the writer of this DLL and i don't have vista to try another solution. I can't do anything for you,

sorry!
Gai-Luron
S3 licensed
Concatenation is done with .

$b1 = $a1 . $a2;
Gai-Luron
S3 licensed
Error message is incomplete. need the few line before. Maybe default top car not set
Gai-Luron
S3 licensed
Hello,


it's a bug, Sorted

Download corrected release. Replace only exe file.


Bye

Gai-Luron
FGED GREDG RDFGDR GSFDG