The online racing simulator
How to give automatic Blue-flag penalties ?
i replace Airio for LFSlapper for our pro server and i need to set automatic penalties for blue-flag repetitive no-respect from a driver.

How to set this please ?

for my best, a repetitive no-respect blue-flag must be penalyze by a "drive thru".

i do not find how to do this and we organize a 2H semi-enduro this friday

thanks a lot for help
Lapper has this Lapper Event you can use for that:

OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$Time);

Put that in an event and do some logging about how many blueflags a player can have, before getting a penalty.
Shrug i do not find the "onPlayerflags" on LFSLapper.lpr and see no way to put many of flags a player can have in the other files before a penalty, i don't find the line to choose penalty for repeating Blue flag
Frown

ps : i dont know what version LFSLapper.lpr i have cause i also have the message on top "Lapperscript dedevelopment , something with a message system" .. and the only way to solve it is to ask a friend Lapper.lpr which do not have this message to replace mine with it.
Right click lfslapper.exe file, properties tab, and look at Product Version.

onPlayerflags was added in V7.0.4.10.

If you want to find updated versions, look HERE.
ok, i will try to find it, my lapper is on Rackservice servers


edit : Rackservice install 7.0.6.3 versions ... (the install has be done this monday)

Thanks for your answers

so the last release for Lapper is "public test 10 B" ? is it ok to transmit to rackservice ?
When in game, type "!ver".

I'm still on V6.013. Maybe I'll need to reboot lapper to get it to update.
must i transmit to rackservice the followed files :

- LFSLapper V7.0.6.4 publicTest_06.zip
and include in :
- LFSlapper.exe public test 10 B

?? Looking
Quote from Tomfuel :must i transmit to rackservice the followed files :

- LFSLapper V7.0.6.4 publicTest_06.zip
and include in :
- LFSlapper.exe public test 10 B

?? Looking

Version 7.0.6.4 never made it to a public version (please correct me if I am wrong Bass-Driver) and must be considered a beta version.
If you are on 7.0.6.3 you are on the latest released version and should be able to do all you want to, including the flags we were talking about earlier in this thread.
Quote from Tomfuel :Shrug i do not find the "onPlayerflags" on LFSLapper.lpr and see no way to put many of flags a player can have in the other files before a penalty, i don't find the line to choose penalty for repeating Blue flag
Frown

ps : i dont know what version LFSLapper.lpr i have cause i also have the message on top "Lapperscript dedevelopment , something with a message system" .. and the only way to solve it is to ask a friend Lapper.lpr which do not have this message to replace mine with it.

The flags are found in lfslapper.lpr (I have version 7.0.4.10 , which isn't the latest version but in a higher version it is as well), see this:


#########################################################################################
#Action on Event when player receives a Flag (Yellow/Blue flags and Lag/Missing packets)#
#########################################################################################
# The Flags below returns 1 or 0 depends on which flag is received by the user
#$YellowFlag: Player receives a YellowFlag
#$BlueFlag : Player recieves a BlueFlag
#$LagFlag : Player is lagging or is missing carpackets
#$Time : ShortTimeFormat,same as GetLapperVar("ShortTime");

##########################################################################################

$PlayerFlagEvent = -1; #Enable Event 1 = ON / -1 = OFF
Event OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$Time) # Player event
/*
IF( $YellowFlag == 1) THEN
privmsg("^3YELLOW FLAG");
ENDIF
IF( $BlueFlag == 1) THEN
privmsg("^4BLUE FLAG");
ENDIF
IF( $LagFlag == 1) THEN
privmsg("^5LAG");
ENDIF
*/
EndEvent

This /* and this */ means that the code between those two signs is disabled.
Remove both of them and the code will be active on the next reload of Lapper, that can be done by typing this into the LFS chat (if you have admin rights on Lapper, that is): !reload

To get rid of "LAPPERSCRIP DEVELOPEMENT" search for this piece of code in lfslapper.lpr:


#################################################
#Connect messages when a player joins the server#
#################################################

Event OnConnect( $userName ) # Player event
/*
$NickName = GetCurrentPlayerVar("NickName");
$Posabs = GetCurrentPlayerVar("PosAbs");
$Groupqual = GetCurrentPlayerVar("GroupQual");
openPrivButton( "welc",25,50,150,15,12,-1,ISB_NONE, langEngine("%{main_welc1}%", $NickName ) );
openPrivButton( "pos",25,80,150,10,8,-1,ISB_NONE,langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual ) );
openPrivButton( "clos",78,120,20,10,10,-1,ISB_DARK,langEngine("%{main_accept}%"),OnConnectClose );
openPrivButton( "ref",103,120,20,10,10,-1,ISB_DARK,langEngine("%{main_deny}%"),OnConnectCloseKick );
*/

openPrivButton( "welc",0,0,200,5,12,-1,32, "LAPPERSCRIPT DEVELOPMENT , Something with a Message System.");
EndEvent

Change that to:


#################################################
#Connect messages when a player joins the server#
#################################################

Event OnConnect( $userName ) # Player event
/*
$NickName = GetCurrentPlayerVar("NickName");
$Posabs = GetCurrentPlayerVar("PosAbs");
$Groupqual = GetCurrentPlayerVar("GroupQual");
openPrivButton( "welc",25,50,150,15,12,-1,ISB_NONE, langEngine("%{main_welc1}%", $NickName ) );
openPrivButton( "pos",25,80,150,10,8,-1,ISB_NONE,langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual ) );
openPrivButton( "clos",78,120,20,10,10,-1,ISB_DARK,langEngine("%{main_accept}%"),OnConnectClose );
openPrivButton( "ref",103,120,20,10,10,-1,ISB_DARK,langEngine("%{main_deny}%"),OnConnectCloseKick );
*/

#openPrivButton( "welc",0,0,200,5,12,-1,32, "LAPPERSCRIPT DEVELOPMENT , Something with a Message System.");
EndEvent

Quote from sinanju :Right click lfslapper.exe file, properties tab, and look at Product Version.

onPlayerflags was added in V7.0.4.10.

If you want to find updated versions, look HERE.

i'm lost ..
so i can give automatic penalties for no-respect x quantity of Blueflag in 7.0.6.3 ?

if ok ...i do not see any penalties in your examples Looking

great thanks for your help, i really try to understand
Quote from Tomfuel :i'm lost ..
so i can give automatic penalties for no-respect x quantity of Blueflag in 7.0.6.3 ?

if ok ...i do not see any penalties in your examples Looking

Yeah you can, but you have to write the code your self.
I have just pointed you towards the right event to put that piece of code into.
great Yisc Thumbs up, i will try it but where are the penalties and no idea to create it !
i will search and submit
Hello,
i'm trying to publish a new test version this weekend.

Will be Public_Test V14.

Some versions havent made it to public. Because some of them were too experimental.

Knows Issues: Cannot read '/' char properly.
Quote from Tomfuel :great Yisc Thumbs up, i will try it but where are the penalties and no idea to create it !
i will search and submit

You can give penalties with these commands:


cmdLFS( "/p_30 " . GetCurrentPlayerVar( "UserName" ) );
cmdLFS( "/p_45 " . GetCurrentPlayerVar( "UserName" ) );
cmdLFS( "/p_dt " . GetCurrentPlayerVar( "UserName" ) );
cmdLFS( "/p_sg " . GetCurrentPlayerVar( "UserName" ) );

Penalties:

/p_30 USERNAME :give 30 second time penalty
/p_45 USERNAME :give 45 second time penalty
/p_dt USERNAME :give drive through penalty
/p_sg USERNAME :give stop-go penalty
Over night I have been thinking about how this blue flag penalty could be implemented, but it doesn't seem to be a straight forward thing.

When a player is slow for a reason (skills, technical issue on the car, been in an accident, etc.) the whole field will lap him/her at some point. That means a lot of blue flags will be given, but only counting them isn't doing justice to the player that gets them. I mean, maybe he/she moves out of the way ASAP but since then the next car will appear, the flag count will go up and up. A way to go around that is to count the number of flags within a given time period, but then again, when all the cars are catching up, it still might be too many flags within X seconds.

As far as I know, Lapper can't indicate which players causes you to get a blue flag. It would help to be able to know that Player A gets a blue flag because of Player B and if those are too many, you could apply a penalty. Then the counting starts again when Player A gets a blue flag because of Player C.
I have no idea if there's an Insim packet to get that information and if so, if Bass-Driver would be willing to implement it.
ok ! you are thinking right, i exactly see waht you mean, there is potentially injustice to apply penalties without analyse situation.

thanks for help ! really !
It's in the flag packet already, there's a 'CarBehind' byte which id for the other car. (I don't know if Lapper does anything with it)

Even then though, there's a times when I've gotten the blue flag over and over again for a car that is behind me physically, ahead in the race, but can't catch up. Same car each time, but I'm not doing anything wrong by not parking up and waiting for it to pass Smile

I gave up on penalties because I couldn't discount those situations without more checks than I was willing to invest time into.
ok, thanks for the explain !

FGED GREDG RDFGDR GSFDG