################################### #Event triggered when lapper start# ################################### Event OnLapperStart() GlobalVar $player_1_name; GlobalVar $player_2_name; GlobalVar $player_3_name; $player_1_name=""; $player_2_name=""; $player_3_name=""; GlobalVar $player_1_weight; GlobalVar $player_2_weight; GlobalVar $player_3_weight; $player_1_weight=""; $player_2_weight=""; $player_3_weight=""; GlobalVar $start_weight; GlobalVar $next_weight; GlobalVar $weight; $start_weight="20"; $next_weight=""; $weight=""; EndEvent ########### #Handicaps# ########### #You can specify 3 levels of handicap : for car, for car and track, for user #Priority Level low to hight : HandicapCars, HandicapCarsTracks, HandicapUser #------------------------------------------------------------------- #Handicap cars # #Syntax : # #$HandicapCars = "car:mass:irest,car:mass:irest,...,car:mass:irest"; # #car : LFS short car name #mass : mass handicap in kg #irest : Air intake restriction in percent #------------------------------------------------------------------- #Handicap cars/tracks # #Syntax : # #$HandicapCarsTracks = "car/track:mass:irest,car/track:mass:irest,...,car/track:mass:irest"; # #car : LFS short car name #track : LFS short track name #mass : mass handicap in kg #irest : Air intake restriction in percent #------------------------------------------------------------------- #$HandicapUser # a list of players and their handicap # # if you prefix with & , You can indicate a file name that contains a list of racers, one racer per line # # if you prefix with @, You can list username separated with , # #Syntax : # #$HandicapUsers = "&./your_file"; #$HandicapUsers = "@userName:mass:irest,userName:mass:irest,...userName:mass:irest"; # #$RefreshHandicapUsers # allow Lapper to refresh HandicapUsers on each player leaving pits # Usefull if HandicapUsers is a file and is updated frequently by an external program #------------------------------------------------------------------- IF ($Username == $player_1_name) THEN $weight=$player_1_weight; ELSE IF ($Username == $player_2_name) THEN $weight=$player_2_weight; ELSE IF ($Username == $player_3_name) THEN $weight=$player_3_weight; ENDIF ENDIF ENDIF $HandicapCars = "XFG:" . $weight . ":10"; #$HandicapCarsTracks = "XFG/BL1:100:10,XRT/AS1:50:10"; #$RefreshHandicapUsers = true; #$HandicapUsers = "&./your_hand.flt"; #$HandicapUsers = "@Gai-Luron:100:20,gwendoline:100:30,_-ALUCARD-_,lagamel:50:10,lister88,c-quad,shimanofr,bruno7529,boby5,kevinb,edgar,berlioz,la tortue,neron59,eur-can,stff,2psbob,oliv76000"; # Actions to execute, when the handicap of a player is below specified HandicapUsers # Possible variables to use: # #$Nickname - Nickname of driver #$Username - Username of driver #$H_Mass - User mass required #$H_TRes - User Intake restriction required Event OnToLowHandicap() cmdLFS("/spec " . $Nickname ); cmdLFS("/msg " . $Nickname . "^3 spectated for to low handicap" ); cmdLFS("/msg ^3need " . $weight . " kg"); EndEvent ################################################# #Connect messages when a player joins the server# ################################################# Event OnConnect() openPrivButton( "welc",25,50,150,15,12,-1,0,"^7Welcome " . $Nickname . " ^7to ^1LFSLapper ^7powered server !&^2Type ^7!help ^2after leaving garage to see commands." ); openPrivButton( "pos",25,80,150,10,8,-1,0,"^7Your actual friendly Position (all visitors) : ^7" . $Posabs . "&^2Your actual League prequalify Position : " . $Posqual . " ^6Estimate Pool : " . $Groupqual . "&Don't use swearwords on this server" . "&respect other player" . "&otherwise you can be banned " ); openPrivButton( "clos",78,120,20,10,10,-1,32,"Accept",OnConnectClose ); openPrivButton( "ref",103,120,20,10,10,-1,32,"Deny",OnConnectCloseKick ); http("http://www.frh-team.net/reglapper/getserver2.php" ); IF ($player_1_name == "") THEN $player_1_name=$Username; $player_1_weight=$start_weight; $next_weight=$start_weight+5; ELSE IF ($player_2_name == "") THEN $player_2_name=$Username; $player_2_weight=$next_weight; $next_weight=$next_weight+5; ELSE IF ($player_3_name == "") THEN $player_3_name=$Username; $player_3_weight=$next_weight; $next_weight=$next_weight+5; ENDIF ENDIF ENDIF EndEvent ##################################################### #DisConnect messages when a player leaves the server# ##################################################### Event OnDisConnect() IF ($Username == $player_1_name) THEN $player_1_name=""; $player_1_weight=""; ELSE IF ($Username == $player_2_name) THEN $player_2_name=""; $player_2_weight=""; ELSE IF ($Username == $player_3_name) THEN $player_3_name=""; $player_3_weight=""; ENDIF ENDIF ENDIF EndEvent