The online racing simulator
LFSLapper insim4 Release
(2101 posts, closed, started )
Quote from Balsalobre :Hello!, I installed latest lapper recently but when I use it in the server he players that aren't admins can't ban or kick anybody. How can enable ban an kick in lapper for anybody?


I didn't find it in config file

Thanks

This can be found in the sections "Command actions":


Register MsgAction("!ban",MA_ban);
Sub MA_ban()
$allow = "Gai-Luron";
cmdLFS( "/ban " . $argv . " 1" );
EndSub

After $allow you can specify with players are allowed to execute the !ban command even if they aren't admins.
Sorry I didn't explain well, but what I want to allow vote ban and vote kick for every user, I can't do this now,only admins. i supouse yor response is for the admin privileges for determinate users you want, no?

What is the sentence for allow vote eberybody? You can add user names, but what's is the code for all users. I don't know it

Thank mate again
Ah that makes it more clear. You can't give those rights to every user. They have to be admin on the server or you can put the names after the $allow command. There are no other options.
So there's no way to use lapper in a public server while allowing anonymous users to VOTE for baning/kicking other users? There must be a way, isn't it?

Thx
Quote from delcotron :So there's no way to use lapper in a public server while allowing anonymous users to VOTE for baning/kicking other users? There must be a way, isn't it?

Thx

Hi,
If you want enable voting to ban or kick for any player's on your server , you have (as a admin) type /vote yes

Or in lapper


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

cmdLFS( "/vote yes" );

EndEvent

That's it, thanks a lot Tim!
Gai-Luron, man what a program. Cheers
Could someone post their lapper config where drift functions works like drift PB's etc.

I cant get mine to work.
-
(primmy) DELETED by primmy
Quote from delcotron :So there's no way to use lapper in a public server while allowing anonymous users to VOTE for baning/kicking other users? There must be a way, isn't it?

<small offtopic reaction>
Question remains if you really want that.
On several occasions I've seen users being banned by fellow-racers after making one small mistake. One frustrated racer can make other users being thrown off servers for no apparent reason. When one racer starts a vote, others blindly follow without knowing what is happening. Beginning racers turn their back to the game when being voted off the servers for making the small mistakes every beginner makes.
I myself would vote for leaving the banning actions to the admins. They usually have a better view on the overall behavior of racers..
<back ontopic, don't react, just some food for thought>
Hello, why i cant add a server ip with letters. If i do it in LFSlapper.cfg and start than, comes always a error.

Parse config file... Ko
Syntax error in cfg file var $Host need ' ; at end of line' at line #216
Program ended!

Pls help
Max
The cfg file does specifically want an IP address, if host name lookup hasn't been coded, it just won't work. If it does work with the host name, I think the following approach should do it

$Host = "myown.lfsserver.net";

so, what i have to do ? ^^

EDIT: hehe ist works with "", thanks
Hello Racer,

You can test new Lapper at server "Champ CILF2009 Test" ( The new international championship organised by LFS France ).
For now, i don't release it because it's on dev and many internal modification are to be tested. For now drift database and sync don't work yet. But you can see i continue to dev it. Major modification is the use of sqlite, real SQL database in place of txt file. this can offer much power for the future extensions.
An other ability is to set the number of PB used to calculate an Average PB. Usefull if you don't wan't a PB do with lucky.

Good Xmas to all

Gai-Luron

Quote :+----------------------------+
|Changes from v5.715 to 5.800|
+----------------------------+
1. Use of sqlite database instead of txt file to minimize memory usage
to convert old txt file, remove .txt extension in config file
in $Database

exemple, if your PB file is named PB.txt
change
$Database = "./PB.txt";
to
$Database = "./PB";
Launch Lapper and it will be create sqlite database with your old data

2. Export file have now .elp ( export lapper ) extension, not txt

3. Export file have now a new header with version in it

4. Add new config var
$LapTimeUsedForPb = 1; # How many PB lap used to make average PB time, Min = 1 and Max = 10

5. Removed confid var
$TimeFormat



+----------------------------+
|Changes from v5.714 to 5.715|
+----------------------------+
1. Fix Bug when synchro of multiple PB instance in the same directory

2. Fix conversion float to string in parser eval "=="

3. Add new var
$LapsDone -> Lap done for the current player

4. Add new config var and event
$PitWindowStart=2; -> Begin allowed pit start at this lap ( included )
$PitWindowStop=4; -> End allowed pit finish at this lap ( included )

Event OnNotPitWindow() -> Triggered when a play do a pit on not allowed window
Event OnBeginPitWindow() -> Triggered when a player enter in the pit window allowed lap
Event OnEndPitWindow() -> Triggered when a player exit off the pit window allowed lap

5. Fix HandicapUsers issue when you want use a file

A little request for a (maybe) a small change in Lapper
Hi,
A little request for a (maybe) a small change in Lapper
I have maked a kind of a GUI (Graphical User Interface).
It will be nice when i changed the type of car the $DefaultTopCar also changed and !top show's the correct list.
At this moment it's not posible


#############
#Default Car#
#############

$DefaultTopCar = $current_car;

###################################
#Event triggered when lapper start#
###################################

Event OnLapperStart()
GlobalVar $current_car ;
$current_car = "GTR" ;
EndEvent

Thank's in advance.
PS.
I liked the idea of a SQL database.
Is it also posible to write and read from the database? Like to store usernames ed. in a field and read them later? To setup for exaple a event.
Good work Gai-Luron.
Attached images
gui.jpg
small problem here:

is it possible with the lapper to restart the race 3 minutes after finish or so?
if its possible with the cfg its good, otherwise i need a programmer
GUI is looking very good Tim.
Thanks for a new release Gai-Luron.
I'm not at home at the moment so I can't test it yet.
I also have a small request (on top of the requests I've already made) to add the option to make a script sleep for some time. This would be useful when you want to change track for example.
Quote from Trekkerfahrer :small problem here:

is it possible with the lapper to restart the race 3 minutes after finish or so?
if its possible with the cfg its good, otherwise i need a programmer

Yes that's possible.
Just set the following variable:

$AutoRestartRaceMn = 3;

Race will be automaticly restarted 3 minutes after the last one has finished.
Or when it takes people to long to finish, 3 minutes after the last person finished within time.
Quote from Yisc[NL] :GUI is looking very good Tim.
Thanks for a new release Gai-Luron.
I'm not at home at the moment so I can't test it yet.
I also have a small request (on top of the requests I've already made) to add the option to make a script sleep for some time. This would be useful when you want to change track for example.

Yep, that's a good one "a sleep timer"
+1
Quote from Trekkerfahrer :small problem here:

is it possible with the lapper to restart the race 3 minutes after finish or so?
if its possible with the cfg its good, otherwise i need a programmer

Hi,
In your LFSLapper.lpr file in the section Race Control you can do this.


##############
#Race Control#
##############
#Auto restart:
#$AutoRestartRaceMn = Minutes between the end of a race (last player finished) and an automatic restart
.
.
.
$AutoRestartRaceMn = 3;

Edit :lol, i didn't saw the reply of Yisc
i say thx to both of you
Quote from Gai-Luron :Hello Racer,
Major modification is the use of sqlite, real SQL database in place of txt file. this can offer much power for the future extensions.

sqlite:
be careful with operator LIKE (SELECT ... WHERE ... LIKE ...)
it have specified symbols _ and %

_ mean any one symbol
% mean any symbols

LIKE operator in my project i use for query without case sensitive

ps. sorry for my ugly english
Quote from Tim NL :Hi,
A little request for a (maybe) a small change in Lapper
I have maked a kind of a GUI (Graphical User Interface).
It will be nice when i changed the type of car the $DefaultTopCar also changed and !top show's the correct list.
At this moment it's not posible

Your question was puzzling me so half an hour ago I started looking at your request.
And guess what..............I've found a solution
First declare a variable when Lapper starts, then change the !top command a little and the last step is to add a new command to set $DTC and change the cars on the server.
After Lapper just has been started the !top command takes the value(s) defined in $DefaultTopCar
When $DTC is set the !top command takes that value if no argument is set, and when the argument is different from $DTC value, the argument is taken to show the correct list.
All code is tested and working like a charm.


####################################
#Event triggered when Lapper starts#
###################################$
Event OnLapperStart()
GlobalVar $DTC;
$DTC="";
EndEvent

Register MsgAction("!top",MA_top);
Sub MA_top()
IF ($argv == "")
THEN
top( $DTC );
ELSE
IF ($argv != $DTC)
THEN
top ( $argv );
ENDIF
ENDIF
EndSub

Register MsgAction("!dtc",MA_dtc);
Sub MA_dtc()
$DTC = $argv;
cmdLFS ("/cars " . $argv);
EndSub

Quote from Yisc[NL] :Your question was puzzling me so half an hour ago I started looking at your request.
And guess what..............I've found a solution

Hi,
Thank's Yisc,
It work's ( had to changed it a bit to fit in the gui)
Hi,
Small question and a request for the future.

Is it posible to use

- Loop methods
WHILE ... ENDWHILE
FOR ... STEP ... NEXT

And CASE Select is that posible ( maybe in future version)?
Hello,

Here is a progress report (Like Scawen do ):

Firstly happy new year!

Using Sqlite (database) instead of a text file seems to work well on the test server. I don't use Sqlite now with the drift database and syncing between two Lapper no longer work (for now).
I started big changes on the script parser. I rewrite it!. It is not easy because it's the first time I code this kind of thing. FOR ... BREAK ... ENDFOR and WHILE ... BREAK ... ENDWHILE work currently in my development version. For SWITCH ... CASE ... BREAK ... ENDSWITCH is not a priority as easily achievable with IF ... THEN ... ELSE ... ENDIF. In future version it will be possible to call a function with arguments and this function will return a value.
I think also implement Array vars in the next version. To access to the variables of the current racer use $CurPlayer [idVar]. Example $ CurPlayer [ "nickname"] for $nickname or $CurPlayer [ "LapDones"] for numbers of laps. Unfortunately the newer language scripts are no longer compatible with the older version.

Be patient because my work will not let me much free time and I program the short time I have left.

Bye

Gay-Luron
This thread is closed

LFSLapper insim4 Release
(2101 posts, closed, started )
FGED GREDG RDFGDR GSFDG