+-------------------------------+
|Changes from v6.010 to 6.011 |
+-------------------------------+
Add Krayy Library
1. remove old help command in lfslapper.lpr
2. Add multi tabbed lib in .lpr file, look at gui_help on how to use
3. New commands in lfs:
!ma
!hc
!help
Multi-lang to do in gui_help.lpr
track = ALL
car = ALL
MaxLapTime = 105%
split1 = 105%:110%
split2 = 105%:110%
lapTime = 105%:110%
car = XFR
MaxLapTime = 112%
split1 = 106%:112%
split2 = 106%:112%
lapTime = 106%:112%
...
track = BL1
car = XFR
MaxLapTime = 110%
split1 = 105%:110%
split2 = 105%:0.55.00
lapTime = 105%:1.16.61
1. GetListOfPlayer accept an optional argument to sort the list og player
Example:
$list = GetListOfPlayers("U"); # List sorted by userName
Or
$list = GetListOfPlayers("N"); # List sorted by nickName
$ListOfPlayers = GetListOfPlayers();
$CurrTopSpeed = GetStoredValue( "GlobaltopSpeed" );
FOREACH( $CurrUname IN $ListOfPlayers )
....
$currTopSpeed = getPlayerVar( $CurrUname,"topspeed" );
....
SetStoredValue( "GlobaltopSpeed", $newTopSpeed );
....
ENDFOREACH
...
$speed = toint( GetCurrentPlayerVar( "InstantSpeed" ) );
$topspeed = toint( GetCurrentPlayerVar( "topSpeed" ) );
IF ($speed > $topSpeed)
THEN
setCurrentPlayerVar( "topSpeed", $speed );
privMsg( "^7>Nouveau top speed: ( ^3" . $speed . " ^7) km/h");
ELSE
privMsg( "^7>Vitesse: ( ^3" . $speed . " ^7) km/h");
ENDIF
...
[COLOR=#000000][COLOR=#0000BB]$ListOfUsers [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]GetListOfUsersGroup[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]ExampleFile[/COLOR][COLOR=#007700]);
[/COLOR][COLOR=#0000BB]$NbUsers [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]arrayCount[/COLOR][COLOR=#007700]([/COLOR][COLOR=#0000BB]$ListOfUsers[/COLOR][COLOR=#007700]);
[/COLOR][COLOR=#0000BB]privMsg[/COLOR][COLOR=#007700]( [/COLOR][COLOR=#DD0000]"^7>There are ( ^3" [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#0000BB]$[/COLOR][/COLOR][COLOR=#000000][COLOR=#0000BB]NbUsers [/COLOR][COLOR=#007700][/COLOR][/COLOR][COLOR=#000000][COLOR=#0000BB][/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]" ^7) Users in this file"[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
CatchEvent OnLapperStart ( )
RegisterScheduleAction( "0 0 22 * * * *", SA_race ); #Start race mode at 22pm every day
RegisterScheduleAction( "0 0 0 * * * *", SA_qual ); #Start qual mode at 24pm every day
# Start in in rigth mode
$tim = GetLapperVar( "ShortTime" );
if( SubStr( $tim, 0,2 ) == "10" && SubStr( $tim, 6,2 ) =="PM" ) THEN
DelayedCommand( 10, SA_race );
ELSE
DelayedCommand( 10, SA_qual );
ENDIF
endCatchEvent
Sub SA_race()
cmdLFS("/qual=0");
cmdLFS("/laps=1");
cmdLFS("/restart");
EndSub
Sub SA_qual()
cmdLFS("/qual=60");
cmdLFS("/qualify");
EndSub
CatchEvent OnLapperStart ( )
RegisterScheduleAction( "0 0 22 * * * *", SA_race ); #Start race mode at 22pm every day
RegisterScheduleAction( "0 0 0 * * * *", SA_qual ); #Start qual mode at 24pm every day
# Start in in rigth mode
$tim = GetLapperVar( "ShortTime" );
writeLine( SubStr( $tim, 0,2 ) );
if( SubStr( $tim, 0,2 ) == "10" ) THEN
DelayedCommand( 10, SA_race );
ELSE
DelayedCommand( 10, SA_qual );
ENDIF
endCatchEvent
Sub SA_race()
cmdLFS("/qual=0");
cmdLFS("/laps=1");
cmdLFS("/restart");
EndSub
Sub SA_qual()
cmdLFS("/qual=60");
cmdLFS("/qualify");
EndSub