The online racing simulator
more penalties on car reset
hi,
i plan an enduro race and i use the carreset penalties, but i think car reset is not enough rude for en enduro race

only 1 car reset is allowed on the race, so drivers must try to join their pit by any possible before use it

consider the fact a car reset give you brand new tyres and repair damage, i need to give more than a Stop & Go
i consider SG + 45sec is more realist for a race

because, i do not want foxy drivers who calculate that a Stop&Go is very shorter in time than a tyres change or repair and so Carreset will be used like a rule-hacking ...

so i have that in Lapper.lpr : (V6)
Quote :Sub ApplyCarResetPenalty( $userName )
IF( GetCurrentPlayerVar( "LapsDone" ) > 0 )
THEN
IF( getLapperVar( "RaceLapsLeft" ) <= 1 )
THEN
cmdLFS( "/p_30 " . GetCurrentPlayerVar( "UserName" ) );
ELSE
cmdLFS( "/p_sg " . GetCurrentPlayerVar( "UserName" ) );
ENDIF
ENDIF
EndSub

and these lines in V7 :
Quote :Sub ApplyCarResetPenalty( $userName )
IF( GetCurrentPlayerVar( "LapsDone" ) > 0 )
THEN
IF( getLapperVar( "RaceLapsLeft" ) <= 1 )
THEN
cmdLFS( "/p_30 " . GetCurrentPlayerVar( "UserName" ) );
ELSE
cmdLFS( "/p_dt " . GetCurrentPlayerVar( "UserName" ) );
ENDIF
ELSE
IF( getLapperVar( "RaceLapsLeft" ) > 1 )
THEN
cmdLFS( "/p_sg " . GetCurrentPlayerVar( "UserName" ) );
ENDIF
ENDIF
EndSub

how to give SG + 45sec please ? Smile
Quote from Tomfuel :hi,
i plan an enduro race and i use the carreset penalties, but i think car reset is not enough rude for en enduro race

only 1 car reset is allowed on the race, so drivers must try to join their pit by any possible before use it

consider the fact a car reset give you brand new tyres and repair damage, i need to give more than a Stop & Go
i consider SG + 45sec is more realist for a race

because, i do not want foxy drivers who calculate that a Stop&Go is very shorter in time than a tyres change or repair and so Carreset will be used like a rule-hacking ...

so i have that in Lapper.lpr : (V6)


and these lines in V7 :


how to give SG + 45sec please ? Smile

If you give one penalty, and a second one
2nd one will overwrite 1st penalty

I dont think that its possible to give 2 penalties at the same time. Or Am I Wrong?
Quote from ScottLy :If you give one penalty, and a second one
2nd one will overwrite 1st penalty

I dont think that its possible to give 2 penalties at the same time. Or Am I Wrong?

You are right about that, but I think I have come up with a way to solve that issue, as in "storing the second penalty for later on".
Just haven't got the time to work it out tonight, so will come back to the subject in the next few days.
One common way to penalise rejoins and resets, as done by other endurance leagues, could also be to reduce the completed scored laps for a team. I think
\setlap USERNAME -1

could work.
finally, i think 45sec is a sufficient penalty, due to additional lost time in crash ..
i rule like that for the incoming enduro
thanks for your thoughts Wink


no, it's not enough ... see message below
last update, team members consider 45sec is not enough penalty , especially in case of enduro race,
so the question is always active :
how to give more than 45sec penalty on car-reset ?

2 x 45sec penalty would be good, how to do that please ?Uhmm

thanks a lot
-
Multiple penalties for a player (Yisc[NL]) DELETED by Yisc[NL]
LFS Lapper: Multiple penalties
As promised, by view on how to do multiple penalties:

1) Add the code below to the OnLap event. When a driver completes a lap, Lapper will see if that player hasn't got an active penalty (PenaltyNew == 0) AND if PlayerVar 'reset_abuse' is set to "true". If so, give the player a 45 sec penalty


Event OnLap( $userName ) # Player event
IF ( GetCurrentPlayerVar ( "PenaltyNew" ) == 0 && GetCurrentPlayerVar ( "reset_abuse" ) == "true" )
THEN
cmdLFS( "/p_45 " . $userName );
ENDIF
EndEvent

2) Add the code below to the OnRaceStart event. This is to clear PlayerVar 'reset_abuse' for every player that starts the race (in case there are multiple races)


Event OnRaceStart( $NumP ) # Lapper event
$mList = GetListOfPlayers("N");
$mCount = arrayCount( $mList );
$plyNum=0;
$players_on_track=0;

WHILE ($plyNum < $mCount)
$uName = $mList[$plyNum];
SetPlayerVar( $uName,"reset_abuse","" );
$plyNum=$plyNum+1;
ENDWHILE
EndEvent

3) When applying ResetPenalty, set PlayerVar 'reset_abuse' to "true"


Sub ApplyCarResetPenalty( $userName )
IF( GetCurrentPlayerVar( "LapsDone" ) > 0 )
THEN
IF( getLapperVar( "RaceLapsLeft" ) <= 1 )
THEN
cmdLFS( "/p_30 " . GetCurrentPlayerVar( "UserName" ) );
ELSE
cmdLFS( "/p_sg " . GetCurrentPlayerVar( "UserName" ) );
SetCurrentPlayerVar ( "reset_abuse","true" );
ENDIF
ENDIF
EndSub


FGED GREDG RDFGDR GSFDG