The online racing simulator
LFSLapper insim4 Release
(2101 posts, closed, started )
Playing around with lapper again, trying to get private messages to work.

Tried
Register MsgAction("ho" | "hoho" | "hohoho",MA_santa);
Sub MA_santa()
privMsg( $Nickname . "^1, you sound like Santa. " );
EndSub
Didn't work.

So then tried
Register MsgAction("ho | hoho | hohoho",MA_santa);
Sub MA_santa()
privMsg( $Nickname . "^1, you sound like Santa. " );
EndSub
Didn't work either.

However, what does work, is
Register MsgAction("ho",MA_santa);
Register MsgAction("hoho",MA_santa);
Register MsgAction("hohoho",MA_santa);
Sub MA_santa()
privMsg( $Nickname . "^1, you sound like Santa. " );
EndSub

Seems long winded to me.

Where am I going wrong with | (or) expression?

I've tested this and it seems that those actions can't be grouped by |
So your last solution is the correct one.
Sorry for dumb question but how do the autorestart 5 minutes after all finished and how to do autochange track after 4 races? (sorry for bad english)
Quote from kodyro :Sorry for dumb question but how do the autorestart 5 minutes after all finished and how to do autochange track after 4 races? (sorry for bad english)


$AutoRestartRaceMn = 5;

$EnableRotation = true;
$RotateTracks = "BL2,BL2,BL1";
$RotateEveryNbRaces = 4;
$RotateCars = "XFG,XRG,FBM";

I have the latest version of lapper installed on my server. I setup the idle function and added my admins to the idleExclude var. With more than one username, I first used "," but this was the same as disabling the function. I then tried "&", same thing as before. The function will only seem to work with one or no usernames in the exclude var. My question is how to include more than one username correctly in the var?

Example of how I have tried so far: (let's say the admins are admin1 admin2 and admin3)

$IdleExclude = "admin1,admin2,admin3"; - didn't work at all. Nobody was spectated.

$IdleExclude = "admin1 admin2 admin3"; - again, didn't work.

$IdleExclude = "admin1&admin2&admin3"; - same as above.

BUT:

$IdleExclude = "admin1"; - will work for the single username.

Can anyone shine a light on this?

Thanks
Quote from tlcook :I have the latest version of lapper installed on my server. I setup the idle function and added my admins to the idleExclude var. With more than one username, I first used "," but this was the same as disabling the function. I then tried "&", same thing as before. The function will only seem to work with one or no usernames in the exclude var. My question is how to include more than one username correctly in the var?

Example of how I have tried so far: (let's say the admins are admin1 admin2 and admin3)

$IdleExclude = "admin1,admin2,admin3"; - didn't work at all. Nobody was spectated.

$IdleExclude = "admin1 admin2 admin3"; - again, didn't work.

$IdleExclude = "admin1&admin2&admin3"; - same as above.

BUT:

$IdleExclude = "admin1"; - will work for the single username.

Can anyone shine a light on this?

Thanks

The standard config-file (5.714) shows the following syntax:

#$IdleExclude = "Lagamel,Gai-Luron"; # Usernames excluded for idle check

Make sure to remove # before the line to active the option.
Also make sure to use usernames instead of nicknames.
Quote from Yisc[NL] :

$AutoRestartRaceMn = 5;

$EnableRotation = true;
$RotateTracks = "BL2,BL2,BL1";
$RotateEveryNbRaces = 4;
$RotateCars = "XFG,XRG,FBM";


Where i can wrote this code ? (bad english again)
Quote from kodyro :Where can I write this code ? (bad english again)

It's already in the config-file (see section "Race Control") so you only have to modify the values.
dam ,im using old lapper version 5.14 ... Did someone have a newest lapper with drift points ? Can you put it here please .

Thanks .
Quote from kodyro :dam ,im using old lapper version 5.14 ... Did someone have a newest lapper with drift points ? Can you put it here please .

Thanks .

AFAIK ALL versions of lapper have drift points...it's just a case of editing the *.cfg file, as mentioned elsewhere on this thread...
Quote from kodyro :dam ,im using old lapper version 5.14 ... Did someone have a newest lapper with drift points ? Can you put it here please .

Thanks .

Try page 1 of this thread
Thanx tim ,you really help 4 me . But i couldn't find how drift points turn on (dumb question again and again and again ,and bad english too )
Quote from kodyro :Thanx tim ,you really help 4 me . But i couldn't find how drift points turn on (dumb question again and again and again ,and bad english too )

You have to remove /* and *\ in the drift section.
/* = start exclusion
*/ = end exclusion
Hello,

i need some help for my problem with lapper. I want to make an authorisation for our server. All drivers should make a qualify but only racers with authorisation should drive in the race. Can i do this with lapper? i´m trying many things but isn´t work for me.

thanks
UltimateGER
Thanks for the help with my query. Unfortunately, the function still does not work when more than one username is defined in the var. Nevermind. Probably something to fix in the next release?

Another query!

Is it possible to make a script to allow only certain usernames to use some cars? If an example script could be provided, that'd be greatly appreciated. What I mean is, all cars are unlocked, but if your username is not blah,helo,weg then you can't leave the pits with certain cars. But if your name is either blah,helo,weg then you can choose any car.

Thanks.
Quote from UltimateGER :Hello,

i need some help for my problem with lapper. I want to make an authorisation for our server. All drivers should make a qualify but only racers with authorisation should drive in the race. Can i do this with lapper? i´m trying many things but isn´t work for me.

thanks
UltimateGER

That's possible. Go to the "Authorization Options ( license )" section and define the level of authorisation you want. Like:

$Auth1 = "FBM:BL1:1.20.00";

This means that authorisation is set for car FBM on track BL1 for everyone with a time of 1m20sec or below. You can define up to 10 different authorisations by raising the number that's behind $Auth like $Auth2, $Auth3 etc.

Then set the following:

$AuthAllowPlayer = "Auth1";

This means players have to equal the settings given in $Auth1
If you've set more $Auth values just seperate them with | (= or) or & (= and) like:

$AuthAllowPlayer = "Auth1|Auth2";
$AuthAllowPlayer = "Auth1&Auth2";

Then set the following:

$AuthMinPlayer = 9;

The number you choose is to define when autorisation is needed. In this example the number is set to 9 which means that when less then 9 people are connected everyone can drive and try to get authorisation and when 9 or more people are connected, your time (stored in the PB-file) has to be lower or equal to the value set in $Auth1
Quote from tlcook :Thanks for the help with my query. Unfortunately, the function still does not work when more than one username is defined in the var. Nevermind. Probably something to fix in the next release?

Another query!

Is it possible to make a script to allow only certain usernames to use some cars? If an example script could be provided, that'd be greatly appreciated. What I mean is, all cars are unlocked, but if your username is not blah,helo,weg then you can't leave the pits with certain cars. But if your name is either blah,helo,weg then you can choose any car.

Thanks.

That might be a bug then, hopefully Gai-Luron will notice this and correct it when neccesary.
About authorisation see my previous posting.

Let people get authorised for some cars or give them all cars when you set something like this:

$AuthAllowPlayer="Auth1|Auth2|@username1,username2,username3,username3";
Quote from Yisc[NL] :That might be a bug then, hopefully Gai-Luron will notice this and correct it when neccesary.
About authorisation see my previous posting.

Let people get authorised for some cars or give them all cars when you set something like this:

$AuthAllowPlayer="Auth1|Auth2|@username1,username2,username3,username3";

Thanks. And what would I need to put in the $Auth1 =""; part?

I want to authorise certain usernames to use the GTRs and FWD cars, all other cars can be used by all guests. Just want GTRs and FWD cars restricting to use by authorised usernames only.

Thanks.
Quote from tlcook :Thanks. And what would I need to put in the $Auth1 =""; part?

I want to authorise certain usernames to use the GTRs and FWD cars, all other cars can be used by all guests. Just want GTRs and FWD cars restricting to use by authorised usernames only.

Thanks.

Hi tlcook,
You can use something like this.
Enable the GTR and the FWD in your Dedi server.
The people by $AuthAllowPlayer can drive GTR AND FWD and the rest can only drive FWD.


#######################
#Authorization Options ( license )#
#######################
#
$Auth1 = "FBM:BL1:1.16.00";

[COLOR=red]$AuthAllowPlayer = "@username1,username2,...,usernameN";[/COLOR]

$AuthMinPlayer = 0; # Minimum number of players on the server to auto enable authorization
# If number of players is below value, alle players are allowed
# If number of players is above value, only AuthAllowPlayer are allowed
Event OnAuthAllowed()
privMsg( $Nickname . "^3 allowed to drive GTR on this server" );
Endevent

Event OnAuthNotAllowed()
IF( $Car == "FXR")
THEN
cmdLFS("/spec " . $Username . );
privMsg( $Nickname . "^3 not allowed to drive " . $Car . " on this server");
ENDIF
IF( $Car == "XRR")
THEN
cmdLFS("/spec " . $Username . );
privMsg( $Nickname . "^3 not allowed to drive " . $Car . " on this server");
ENDIF
IF( $Car == "FZR")
THEN
cmdLFS("/spec " . $Username . );
privMsg( $Nickname . "^3 not allowed to drive " . $Car . " on this server");
ENDIF
privMsg( $Nickname . "^3 allowed to drive UFR/XFR on this server");
Endevent

# Local viariable that can be used
# $auth -> Authorization reached
Event OnAuthReached()
privMsg("^3You have got level" . $auth );
EndEvent

Quote from Yisc[NL] :That's because you used | which stands for OR
So now you have FXR:AS:1.44.00 OR FZR:AS3:1.44.00 OR XRR:AS:1.44.00 AND (the names)
You have to set it to the following:

$Auth1 = "FXR:AS3:1.44.00 & @Andy King,John Doe,Jan Doe,Gai-Luron";
$Auth2 = "FZR:AS3:1.44.00 & @Andy King,John Doe,Jan Doe,Gai-Luron";
$Auth3 = "XRR:AS3:1.44.00 & @Andy King,John Doe,Jan Doe,Gai-Luron";

And then make sure authorisation is set to $Auth1,2,3

You can also choose to set it like this:

$Auth1 = "FXR:AS3:1.44.00 & @Andy King,John Doe,Jan Doe,Gai-Luron | FZR:AS3:1.44.00 & @Andy King,John Doe,Jan Doe,Gai-Luron | XRR:AS3:1.44.00 & @Andy King,John Doe,Jan Doe,Gai-Luron";

Hi All,
I was a bit premature in the THANYOU as it doesn't work lol. I want to only allow a Racer with a Single car with a PB of less than 1.44.00 to Race. For Example....

FXR - AS3 - 1.44.00 - Andy King

I have tried so many combinations to make this work I have gave up trying but here I am back again coss I hate anything beating me lol.

So if anyone has any ideas please post them, other than putting it in the bin lol.

SORTED THANKS GUYS
MPH as a speed identifier doesn't appear to work.

I have my player Options set to MPH, as well as acceleration options in lapper script, but I always get speed displayed as km/h.

Is this a bug?

#==================#
#Options for acceleration#
#==================#

#$AccelerationStartSpeed = 1; # At which speed to start measuring time. In km/h
#$AccelerationEndSpeed = 100; # At which speed to stop measuring time. In km/h

$AccelerationStartSpeedMph = 1; # At which speed to start measuring time. In Mph
$AccelerationEndSpeedMph = 60; # At which speed to stop measuring time. In Mph

$AccelerationPrivateMaxTime = 10; # Maximum acceleration time in seconds to show message
#Message to show to players.
Event OnAcceleration()
privMsg( "^8Accelerated in ^3" . $AccelerationTime . "^8 seconds to " . $AccelerationEndSpeedMph . " " . $UnitSpeed ."!" );
EndEvent
Some help and advice please?

A lot of times when people join server, by the time they get from the joining screen to becoming a spectator, they've forgot what track they've joined. (I know you can look at F12, but others don't).

I'd like this info to come up as short message only for player joining, or as a small help window button but am not sure what and where I put commands.

Have tried:

#==================================#
#Event triggered when lapper starts#
#==================================#

Event OnLapperStart()
GlobalVar $Noobs;
EndEvent


#===============#
#Command actions#
#===============#

Event $Noobs()
privMsg("Welcome " . $Nickname . " to "$HostName );
privMsg("^3Here at " . $LongTrackName . " (" . $ShortTrackName . "), you have a choice of cars to drive: " . $CurrRotateCar );
EndEvent


This hasn't worked.

Then I tried:

#===============#
#Command actions#
#===============#


Register MsgAction("!noobs",MA_noobs);
Sub MA_noobs()
openPrivButton( "help",25,28,150,10,5,-1,0,"^2Short list of commands" );
openPrivButton( "help2",25,38,150,6,5,-1,96,"^2General commands"
. "&^3!track ^8Name of actual track"
. "&^3!top ^8[table offset] [3-letter car name] ['filter' pattern]"
. "&^3!spb ^8Split times and TPB (Theoretical PB)"
. "&^3!pitboard ^8Pitboard facility (look at very top of screen)"
. "&^3Shft+i ^8Configure your display messages" );
. "&^3F12 ^8Press this to see where you are, number of quali and race laps, etc" );

. "&^3n ^8pressing repeatedly will show who's on server, show send/receive setups, etc." );
openPrivButton( "close",90,145,20,10,8,-1,32,OK,MA_closeHelp );
EndSub

but that relies on someone actually specifying !noobs (and who would want to do that!).

How do I get that window button to show up when someone first becomes spectator?

(I'm ok about setting up button to either self close or needing other button to close).
Quote from sinanju :Some help and advice please?

A lot of times when people join server, by the time they get from the joining screen to becoming a spectator, they've forgot what track they've joined. (I know you can look at F12, but others don't).

I'd like this info to come up as short message only for player joining, or as a small help window button but am not sure what and where I put commands.

You have to set it in the On connect section.
Something like this:


Event OnConnect()
privMsg("Welcome " . $Nickname . "^8 to " . $HostName );
privMsg("^3Here at " . $LongTrackName . " (" . $ShortTrackName . ")" );
privMsg("^3you have a choice of cars to drive: " . $CurrRotateCar );
EndEvent

I've split the messages into 3 lines otherwise some text won't be visable at the end of the line. You forgot a . before $HostName
Other option is to make a nice button-screen (see attached image)
If you want to see such screen live, go to:

[R-R]-Public demo
Absolute-beginners.nl[demo]
Attached images
Image1.png
Quote from Andy King :Hi All,
I was a bit premature in the THANYOU as it doesn't work lol. I want to only allow a Racer with a Single car with a PB of less than 1.44.00 to Race. For Example....

FXR - AS3 - 1.44.00 - Andy King

I have tried so many combinations to make this work I have gave up trying but here I am back again coss I hate anything beating me lol.

So if anyone has any ideas please post them, other than putting it in the bin lol.

SORTED THANKS GUYS

I see you already sorted this while I was looking at it.
Still I like to write down my solution of this problem:


$Auth1 = "XFG:BL1:1.44.00";
$Auth2 = "FBM:BL1:1.44.00";

$AuthAllowPlayer = "Auth1|Auth2";

Event OnAuthAllowed()
cmdLFS( "/msg " . $Nickname . "^3 allowed on this server" );
IF ($Username == "Yisc[NL]")
THEN
IF ($Car != "XFG")
THEN
cmdLFS("/spec " );
cmdLFS("/msg Wrong car, you must choose XFG");
ENDIF
ENDIF
Endevent

First of all everyone has to get passed $Auth1 or $Auth2
The a username check is done to see which car you selected and if that's the correct one.
This thread is closed

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