################################### #Event triggered when lapper start# ################################### Event OnLapperStart() ### Admin panel ### GlobalVar $Admin_left_right; GlobalVar $Admin_top_bottom; GlobalVar $Track; GlobalVar $Reverse; GlobalVar $Information; GlobalVar $Information_b; GlobalVar $Weather; Globalvar $Wind; GlobalVar $Qualify; GlobalVar $Race; GlobalVar $Race_value; GlobalVar $Pitwindow_1_value; GlobalVar $Pitwindow_2_value; GlobalVar $Car_UF1; GlobalVar $Car_XFG; GlobalVar $Car_XRG; GlobalVar $Car_LX4; GlobalVar $Car_LX6; GlobalVar $Car_RB4; GlobalVar $Car_FXO; GlobalVar $Car_XRT; GlobalVar $Car_RAC; GlobalVar $Car_FZ5; GlobalVar $Car_Road; GlobalVar $Car_UFR; GlobalVar $Car_XFR; GlobalVar $Car_FXR; GlobalVar $Car_XRR; GlobalVar $Car_FZR; GlobalVar $Car_FBM; GlobalVar $Car_FOX; GlobalVar $Car_FO8; GlobalVar $Car_BF1; GlobalVar $Car_Race; GlobalVar $Car_MRT; GlobalVar $Car_All; GlobalVar $Car_TBO; GlobalVar $Car_LRF; GlobalVar $Car_GTR; GlobalVar $Cars; GlobalVar $Car_check; GlobalVar $Start; GlobalVar $Must_pit; GlobalVar $Can_reset; GlobalVar $Can_vote; GlobalVar $Can_select; GlobalVar $Autokick; GlobalVar $Midrace; GlobalVar $Force_CPV; GlobalVar $Cruise; GlobalVar $Password_status; GlobalVar $Password; GlobalVar $Misc_information; GlobalVar $DTC; # Can be removed if you're using Pitboard also $Admin_left_right=34; $Admin_top_bottom=15; $Track=""; $Reverse=""; $Information=""; $Information_b=""; $Weather=""; $Wind=0; $Qualify=0; $Race=1; $Race_value="lap(s)"; $Pitwindow_1_value=""; $Pitwindow_2_value=""; $Car_UF1=0; $Car_XFG=0; $Car_XRG=0; $Car_LX4=0; $Car_LX6=0; $Car_RB4=0; $Car_FXO=0; $Car_XRT=0; $Car_RAC=0; $Car_FZ5=0; $Car_Road=0; $Car_UFR=0; $Car_XFR=0; $Car_FXR=0; $Car_XRR=0; $Car_FZR=0; $Car_FBM=0; $Car_FOX=0; $Car_FO8=0; $Car_BF1=0; $Car_Race=0; $Car_MRT=0; $Car_All=0; $Car_TBO=0; $Car_LRF=0; $Car_GTR=0; $Cars=""; $Car_check="No"; $Start=""; $Must_pit=""; $Can_reset=""; $Can_vote=""; $Can_select=""; $Autokick=""; $Midrace=""; $Force_CPV=""; $Cruise=""; $Password_status=""; $Password=""; # enter a password which can be switched on using Admin panel $Misc_information=""; $DTC=""; # Can be removed if you're using Pitboard also EndEvent ################# #Command actions# ################# Register MsgAction("!admin",MA_admin); Sub MA_admin() closePrivButton("track_weather_sunny&track_weather_cloudy&track_weather_cloudy_b&track_weather_sunset"); openPrivButton( "admin_bg",$Admin_left_right,$Admin_top_bottom,132,171,5,-1,32,"" ); openPrivButton( "tracks_bg",$Admin_left_right+1,$Admin_top_bottom+1,64,62,5,-1,16,"" ); openPrivButton( "tracks_title",$Admin_left_right+2,$Admin_top_bottom+2,62,5,5,-1,0,"^7Tracks:" ); ### Tracks Aston ### openPrivButton( "tracks_as",$Admin_left_right+2,$Admin_top_bottom+8,5,5,5,-1,64,"^3AS:" ); IF ($Track == "AS1") THEN openPrivButton( "track_as1",$Admin_left_right+9,$Admin_top_bottom+8,5,5,5,-1,96,"^2AS1",Track_AS1 ); ELSE openPrivButton( "track_as1",$Admin_left_right+9,$Admin_top_bottom+8,5,5,5,-1,96,"^3AS1",Track_AS1 ); ENDIF IF ($Track == "AS2") THEN openPrivButton( "track_as2",$Admin_left_right+16,$Admin_top_bottom+8,5,5,5,-1,96,"^2AS2",Track_AS2 ); ELSE openPrivButton( "track_as2",$Admin_left_right+16,$Admin_top_bottom+8,5,5,5,-1,96,"^3AS2",Track_AS2 ); ENDIF IF ($Track == "AS3") THEN openPrivButton( "track_as3",$Admin_left_right+23,$Admin_top_bottom+8,5,5,5,-1,96,"^2AS3",Track_AS3 ); ELSE openPrivButton( "track_as3",$Admin_left_right+23,$Admin_top_bottom+8,5,5,5,-1,96,"^3AS3",Track_AS3 ); ENDIF IF ($Track == "AS4") THEN openPrivButton( "track_as4",$Admin_left_right+30,$Admin_top_bottom+8,5,5,5,-1,96,"^2AS4",Track_AS4 ); ELSE openPrivButton( "track_as4",$Admin_left_right+30,$Admin_top_bottom+8,5,5,5,-1,96,"^3AS4",Track_AS4 ); ENDIF IF ($Track == "AS5") THEN openPrivButton( "track_as5",$Admin_left_right+37,$Admin_top_bottom+8,5,5,5,-1,96,"^2AS5",Track_AS5 ); ELSE openPrivButton( "track_as5",$Admin_left_right+37,$Admin_top_bottom+8,5,5,5,-1,96,"^3AS5",Track_AS5 ); ENDIF IF ($Track == "AS6") THEN openPrivButton( "track_as6",$Admin_left_right+44,$Admin_top_bottom+8,5,5,5,-1,96,"^2AS6",Track_AS6 ); ELSE openPrivButton( "track_as6",$Admin_left_right+44,$Admin_top_bottom+8,5,5,5,-1,96,"^3AS6",Track_AS6 ); ENDIF IF ($Track == "AS7") THEN openPrivButton( "track_as7",$Admin_left_right+51,$Admin_top_bottom+8,5,5,5,-1,96,"^2AS7",Track_AS7 ); ELSE openPrivButton( "track_as7",$Admin_left_right+51,$Admin_top_bottom+8,5,5,5,-1,96,"^3AS7",Track_AS7 ); ENDIF ### End ### ### Tracks Blackwood ### openPrivButton( "tracks_bl",$Admin_left_right+2,$Admin_top_bottom+15,5,5,5,-1,64,"^3BL:" ); IF ($Track == "BL1") THEN openPrivButton( "track_bl1",$Admin_left_right+9,$Admin_top_bottom+15,5,5,5,-1,96,"^2BL1",Track_BL1 ); ELSE openPrivButton( "track_bl1",$Admin_left_right+9,$Admin_top_bottom+15,5,5,5,-1,96,"^3BL1",Track_BL1 ); ENDIF IF ($Track == "BL2") THEN openPrivButton( "track_bl2",$Admin_left_right+16,$Admin_top_bottom+15,5,5,5,-1,96,"^2BL2",Track_BL2 ); ELSE openPrivButton( "track_bl2",$Admin_left_right+16,$Admin_top_bottom+15,5,5,5,-1,96,"^3BL2",Track_BL2 ); ENDIF ### End ### ### Tracks Fern Bay ### openPrivButton( "tracks_fe",$Admin_left_right+2,$Admin_top_bottom+22,5,5,5,-1,64,"^3FE:" ); IF ($Track == "FE1") THEN openPrivButton( "track_fe1",$Admin_left_right+9,$Admin_top_bottom+22,5,5,5,-1,96,"^2FE1",Track_FE1 ); ELSE openPrivButton( "track_fe1",$Admin_left_right+9,$Admin_top_bottom+22,5,5,5,-1,96,"^3FE1",Track_FE1 ); ENDIF IF ($Track == "FE2") THEN openPrivButton( "track_fe2",$Admin_left_right+16,$Admin_top_bottom+22,5,5,5,-1,96,"^2FE2",Track_FE2 ); ELSE openPrivButton( "track_fe2",$Admin_left_right+16,$Admin_top_bottom+22,5,5,5,-1,96,"^3FE2",Track_FE2 ); ENDIF IF ($Track == "FE3") THEN openPrivButton( "track_fe3",$Admin_left_right+23,$Admin_top_bottom+22,5,5,5,-1,96,"^2FE3",Track_FE3 ); ELSE openPrivButton( "track_fe3",$Admin_left_right+23,$Admin_top_bottom+22,5,5,5,-1,96,"^3FE3",Track_FE3 ); ENDIF IF ($Track == "FE4") THEN openPrivButton( "track_fe4",$Admin_left_right+30,$Admin_top_bottom+22,5,5,5,-1,96,"^2FE4",Track_FE4 ); ELSE openPrivButton( "track_fe4",$Admin_left_right+30,$Admin_top_bottom+22,5,5,5,-1,96,"^3FE4",Track_FE4 ); ENDIF IF ($Track == "FE5") THEN openPrivButton( "track_fe5",$Admin_left_right+37,$Admin_top_bottom+22,5,5,5,-1,96,"^2FE5",Track_FE5 ); ELSE openPrivButton( "track_fe5",$Admin_left_right+37,$Admin_top_bottom+22,5,5,5,-1,96,"^3FE5",Track_FE5 ); ENDIF IF ($Track == "FE6") THEN openPrivButton( "track_fe6",$Admin_left_right+44,$Admin_top_bottom+22,5,5,5,-1,96,"^2FE6",Track_FE6 ); ELSE openPrivButton( "track_fe6",$Admin_left_right+44,$Admin_top_bottom+22,5,5,5,-1,96,"^3FE6",Track_FE6 ); ENDIF ### End ### ### Reverse #### IF ($Reverse == "R") THEN openPrivButton( "track_rev",$Admin_left_right+59,$Admin_top_bottom+25,5,5,5,-1,32,"^2REV",Track_REV ); ELSE openPrivButton( "track_rev",$Admin_left_right+59,$Admin_top_bottom+25,5,5,5,-1,32,"^3REV",Track_REV ); ENDIF ### End #### ### Tracks Kyoto ### openPrivButton( "tracks_ky",$Admin_left_right+2,$Admin_top_bottom+29,5,5,5,-1,64,"^3KY:" ); IF ($Track == "KY1") THEN openPrivButton( "track_ky1",$Admin_left_right+9,$Admin_top_bottom+29,5,5,5,-1,96,"^2KY1",Track_KY1 ); ELSE openPrivButton( "track_ky1",$Admin_left_right+9,$Admin_top_bottom+29,5,5,5,-1,96,"^3KY1",Track_KY1 ); ENDIF IF ($Track == "KY2") THEN openPrivButton( "track_ky2",$Admin_left_right+16,$Admin_top_bottom+29,5,5,5,-1,96,"^2KY2",Track_KY2 ); ELSE openPrivButton( "track_ky2",$Admin_left_right+16,$Admin_top_bottom+29,5,5,5,-1,96,"^3KY2",Track_KY2 ); ENDIF IF ($Track == "KY3") THEN openPrivButton( "track_ky3",$Admin_left_right+23,$Admin_top_bottom+29,5,5,5,-1,96,"^2KY3",Track_KY3 ); ELSE openPrivButton( "track_ky3",$Admin_left_right+23,$Admin_top_bottom+29,5,5,5,-1,96,"^3KY3",Track_KY3 ); ENDIF ### End ### ### Tracks South City ### openPrivButton( "tracks_so",$Admin_left_right+2,$Admin_top_bottom+36,5,5,5,-1,64,"^3SO:" ); IF ($Track == "SO1") THEN openPrivButton( "track_so1",$Admin_left_right+9,$Admin_top_bottom+36,5,5,5,-1,96,"^2SO1",Track_SO1 ); ELSE openPrivButton( "track_so1",$Admin_left_right+9,$Admin_top_bottom+36,5,5,5,-1,96,"^3SO1",Track_SO1 ); ENDIF IF ($Track == "SO2") THEN openPrivButton( "track_so2",$Admin_left_right+16,$Admin_top_bottom+36,5,5,5,-1,96,"^2SO2",Track_SO2 ); ELSE openPrivButton( "track_so2",$Admin_left_right+16,$Admin_top_bottom+36,5,5,5,-1,96,"^3SO2",Track_SO2 ); ENDIF IF ($Track == "SO3") THEN openPrivButton( "track_so3",$Admin_left_right+23,$Admin_top_bottom+36,5,5,5,-1,96,"^2SO3",Track_SO3 ); ELSE openPrivButton( "track_so3",$Admin_left_right+23,$Admin_top_bottom+36,5,5,5,-1,96,"^3SO3",Track_SO3 ); ENDIF IF ($Track == "SO4") THEN openPrivButton( "track_so4",$Admin_left_right+30,$Admin_top_bottom+36,5,5,5,-1,96,"^2SO4",Track_SO4 ); ELSE openPrivButton( "track_so4",$Admin_left_right+30,$Admin_top_bottom+36,5,5,5,-1,96,"^3SO4",Track_SO4 ); ENDIF IF ($Track == "SO5") THEN openPrivButton( "track_so5",$Admin_left_right+37,$Admin_top_bottom+36,5,5,5,-1,96,"^2SO5",Track_SO5 ); ELSE openPrivButton( "track_so5",$Admin_left_right+37,$Admin_top_bottom+36,5,5,5,-1,96,"^3SO5",Track_SO5 ); ENDIF IF ($Track == "SO6") THEN openPrivButton( "track_so6",$Admin_left_right+44,$Admin_top_bottom+36,5,5,5,-1,96,"^2SO6",Track_SO6 ); ELSE openPrivButton( "track_so6",$Admin_left_right+44,$Admin_top_bottom+36,5,5,5,-1,96,"^3SO6",Track_SO6 ); ENDIF ### End ### ### Tracks Westhill ### openPrivButton( "tracks_we",$Admin_left_right+2,$Admin_top_bottom+43,5,5,5,-1,64,"^3WE:" ); IF ($Track == "WE1") THEN openPrivButton( "track_we1",$Admin_left_right+9,$Admin_top_bottom+43,5,5,5,-1,96,"^2WE1",Track_WE1 ); ELSE openPrivButton( "track_we1",$Admin_left_right+9,$Admin_top_bottom+43,5,5,5,-1,96,"^3WE1",Track_WE1 ); ENDIF ### End ### ### Information ### openPrivButton( "track_info",$Admin_left_right+2,$Admin_top_bottom+50,5,5,5,-1,64,"^7INF:" ); openPrivButton( "track_info_b",$Admin_left_right+9,$Admin_top_bottom+50,55,5,5,-1,16,"^7" . $Information . " " . $Information_b ); ### End ### ### End race - Set track ### openPrivButton( "end_race",$Admin_left_right+2,$Admin_top_bottom+57,31,5,5,-1,32,"^7End race",End_race ); openPrivButton( "set_track",$Admin_left_right+33,$Admin_top_bottom+57,31,5,5,-1,32,"^7Set track",Set_track ); ### End #### ### Weather ### openPrivButton( "weather_bg",$Admin_left_right+1,$Admin_top_bottom+65,64,27,5,-1,16,"" ); openPrivButton( "weather_title",$Admin_left_right+2,$Admin_top_bottom+66,62,5,5,-1,0,"^7Weather:" ); IF ($Track == "AS1" || $Track == "AS1R" || $Track == "AS2" || $Track == "AS2R" || $Track == "AS3" || $Track == "AS3R" || $Track == "AS4" || $Track == "AS4R" || $Track == "AS5" || $Track == "AS5R" || $Track == "AS6" || $Track == "AS6R" || $Track == "AS7" || $Track == "AS7R") THEN IF ($Weather == "1") THEN openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^2Sunny afternoon",Track_weather_1 ); ELSE openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^3Sunny afternoon",Track_weather_1 ); ENDIF IF ($Weather == "2") THEN openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy late afternoon",Track_weather_2 ); ELSE openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy late afternoon",Track_weather_2 ); ENDIF ENDIF IF ($Track == "BL1" || $Track == "BL1R" || $Track == "BL2" || $Track == "BL2R") THEN IF ($Weather == "1") THEN openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^2Sunny afternoon",Track_weather_1 ); ELSE openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^3Sunny afternoon",Track_weather_1 ); ENDIF IF ($Weather == "2") THEN openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy late afternoon",Track_weather_2 ); ELSE openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy late afternoon",Track_weather_2 ); ENDIF IF ($Weather == "3") THEN openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,19,5,5,-1,96,"^2Cloudy sunset",Track_weather_3 ); ELSE openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,19,5,5,-1,96,"^3Cloudy sunset",Track_weather_3 ); ENDIF ENDIF IF ($Track == "FE1" || $Track == "FE1R" || $Track == "FE2" || $Track == "FE2R" || $Track == "FE3" || $Track == "FE3R" || $Track == "FE4" || $Track == "FE4R" || $Track == "FE5" || $Track == "FE5R" || $Track == "FE6" || $Track == "FE6R") THEN IF ($Weather == "1") THEN openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^2Sunny afternoon",Track_weather_1 ); ELSE openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^3Sunny afternoon",Track_weather_1 ); ENDIF IF ($Weather == "2") THEN openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy sunset",Track_weather_2 ); ELSE openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy sunset",Track_weather_2 ); ENDIF IF ($Weather == "3") THEN openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,19,5,5,-1,96,"^2Partly cloudy",Track_weather_3 ); ELSE openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,19,5,5,-1,96,"^3Partly cloudy",Track_weather_3 ); ENDIF ENDIF IF ($Track == "KY1" || $Track == "KY1R" || $Track == "KY2" || $Track == "KY2R" || $Track == "KY3" || $Track == "KY3R") THEN IF ($Weather == "1") THEN openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^2Sunny afternoon",Track_weather_1 ); ELSE openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^3Sunny afternoon",Track_weather_1 ); ENDIF IF ($Weather == "2") THEN openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy late afternoon",Track_weather_2 ); ELSE openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy late afternoon",Track_weather_2 ); ENDIF IF ($Weather == "3") THEN openPrivButton( "track_weather_cloudy_b",$Admin_left_right+45,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy morning",Track_weather_3 ); ELSE openPrivButton( "track_weather_cloudy_b",$Admin_left_right+45,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy morning",Track_weather_3 ); ENDIF ENDIF IF ($Track == "SO1" || $Track == "SO1R" || $Track == "SO2" || $Track == "SO2R" || $Track == "SO3" || $Track == "SO3R" || $Track == "SO4" || $Track == "SO4R" || $Track == "SO5" || $Track == "SO5R" || $Track == "SO6" || $Track == "SO6R") THEN IF ($Weather == "1") THEN openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^2Sunny late afternoon",Track_weather_1 ); ELSE openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^3Sunny late afternoon",Track_weather_1 ); ENDIF IF ($Weather == "2") THEN openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^2Partly cloudy afternoon",Track_weather_2 ); ELSE openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^3Partly cloudy afternoon",Track_weather_2 ); ENDIF IF ($Weather == "3") THEN openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy sunset",Track_weather_3 ); ELSE openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy sunset",Track_weather_3 ); ENDIF ENDIF IF ($Track == "WE1" || $Track == "WE1R") THEN IF ($Weather == "1") THEN openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^2Sunny afternoon",Track_weather_1 ); ELSE openPrivButton( "track_weather_sunny",$Admin_left_right+2,$Admin_top_bottom+72,19,5,5,-1,96,"^3Sunny afternoon",Track_weather_1 ); ENDIF IF ($Weather == "2") THEN openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy late afternoon",Track_weather_2 ); ELSE openPrivButton( "track_weather_cloudy",$Admin_left_right+23,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy late afternoon",Track_weather_2 ); ENDIF IF ($Weather == "3") THEN openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,20,5,5,-1,96,"^2Cloudy sunset",Track_weather_3 ); ELSE openPrivButton( "track_weather_sunset",$Admin_left_right+45,$Admin_top_bottom+72,20,5,5,-1,96,"^3Cloudy sunset",Track_weather_3 ); ENDIF ENDIF IF ($Wind == "0") THEN openPrivButton( "track_weather_nowind",$Admin_left_right+2,$Admin_top_bottom+79,19,5,5,-1,32,"^2No wind",Track_wind_0 ); ELSE openPrivButton( "track_weather_nowind",$Admin_left_right+2,$Admin_top_bottom+79,19,5,5,-1,32,"^3No wind",Track_wind_0 ); ENDIF IF ($Wind == "1") THEN openPrivButton( "track_weather_lowwind",$Admin_left_right+23,$Admin_top_bottom+79,20,5,5,-1,32,"^2Low wind",Track_wind_1 ); ELSE openPrivButton( "track_weather_lowwind",$Admin_left_right+23,$Admin_top_bottom+79,20,5,5,-1,32,"^3Low wind",Track_wind_1 ); ENDIF IF ($Wind == "2") THEN openPrivButton( "track_weather_highwind",$Admin_left_right+45,$Admin_top_bottom+79,19,5,5,-1,32,"^2High wind",Track_wind_2 ); ELSE openPrivButton( "track_weather_highwind",$Admin_left_right+45,$Admin_top_bottom+79,19,5,5,-1,32,"^3High wind",Track_wind_2 ); ENDIF ### End ### ### Set weather ### openPrivButton( "set_weather",$Admin_left_right+2,$Admin_top_bottom+86,62,5,5,-1,32,"^7Set weather",Set_weather ); ### End #### ### Qualify / Racelaps ### openPrivButton( "qualrace_bg",$Admin_left_right+1,$Admin_top_bottom+94,64,34,5,-1,16,"" ); openPrivButton( "qualrace_title",$Admin_left_right+2,$Admin_top_bottom+95,62,5,5,-1,0,"^7Qualify / Race:" ); openPrivButton( "qual",$Admin_left_right+2,$Admin_top_bottom+101,12,5,5,-1,64,"^3Qualify:" ); openPrivButton( "qual_no",$Admin_left_right+16,$Admin_top_bottom+101,5,5,5,-1,96,"^3No",Qual_no ); IF ($Qualify == 0) THEN closePrivButton("qual_min_01&qual_min_10"); openPrivButton( "qual_plus_01",$Admin_left_right+23,$Admin_top_bottom+101,5,5,5,-1,96,"^3+01",Qual_plus_01 ); openPrivButton( "qual_plus_10",$Admin_left_right+30,$Admin_top_bottom+101,5,5,5,-1,96,"^3+10",Qual_plus_10 ); ELSE IF ($Qualify < 10) THEN closePrivButton("qual_min_10"); openPrivButton( "qual_min_01",$Admin_left_right+23,$Admin_top_bottom+101,5,5,5,-1,96,"^3-01",Qual_min_01 ); openPrivButton( "qual_plus_01",$Admin_left_right+30,$Admin_top_bottom+101,5,5,5,-1,96,"^3+01",Qual_plus_01 ); openPrivButton( "qual_plus_10",$Admin_left_right+37,$Admin_top_bottom+101,5,5,5,-1,96,"^3+10",Qual_plus_10 ); ELSE IF ($Qualify >=10 && $Qualify <= 50) THEN openPrivButton( "qual_min_01",$Admin_left_right+23,$Admin_top_bottom+101,5,5,5,-1,96,"^3-01",Qual_min_01 ); openPrivButton( "qual_min_10",$Admin_left_right+30,$Admin_top_bottom+101,5,5,5,-1,96,"^3-10",Qual_min_10 ); openPrivButton( "qual_plus_01",$Admin_left_right+37,$Admin_top_bottom+101,5,5,5,-1,96,"^3+01",Qual_plus_01 ); openPrivButton( "qual_plus_10",$Admin_left_right+44,$Admin_top_bottom+101,5,5,5,-1,96,"^3+10",Qual_plus_10 ); ELSE IF ($Qualify >50 && $Qualify < 60) THEN closePrivButton("qual_plus_10"); openPrivButton( "qual_min_01",$Admin_left_right+23,$Admin_top_bottom+101,5,5,5,-1,96,"^3-01",Qual_min_01 ); openPrivButton( "qual_min_10",$Admin_left_right+30,$Admin_top_bottom+101,5,5,5,-1,96,"^3-10",Qual_min_10 ); openPrivButton( "qual_plus_01",$Admin_left_right+37,$Admin_top_bottom+101,5,5,5,-1,96,"^3+01",Qual_plus_01 ); ELSE IF ($Qualify == 60) THEN closePrivButton("qual_plus_01&qual_plus_10"); openPrivButton( "qual_min_01",$Admin_left_right+23,$Admin_top_bottom+101,5,5,5,-1,96,"^3-01",Qual_min_01 ); openPrivButton( "qual_min_10",$Admin_left_right+30,$Admin_top_bottom+101,5,5,5,-1,96,"^3-10",Qual_min_10 ); ENDIF ENDIF ENDIF ENDIF ENDIF openPrivButton( "qual_info",$Admin_left_right+51,$Admin_top_bottom+101,12,5,5,-1,16,"^7" . $Qualify . " min" ); openPrivButton( "race",$Admin_left_right+2,$Admin_top_bottom+108,5,5,5,-1,64,"^3Race:" ); IF ($Race_value == "hour(s)") THEN openPrivButton( "race_hours",$Admin_left_right+9,$Admin_top_bottom+108,5,5,5,-1,96,"^2Hours",Hours ); ELSE openPrivButton( "race_hours",$Admin_left_right+9,$Admin_top_bottom+108,5,5,5,-1,96,"^3Hours",Hours ); ENDIF IF ($Race_value != "hour(s)") THEN IF ($Race > 1 && $Race <= 100) THEN openPrivButton( "race_min_01",$Admin_left_right+16,$Admin_top_bottom+108,5,5,5,-1,96,"^3-001",Race_min_01 ); ELSE closePrivButton("race_min_01"); ENDIF ELSE IF ($Race > 1 && $Race <= 48) THEN openPrivButton( "race_min_01",$Admin_left_right+16,$Admin_top_bottom+108,5,5,5,-1,96,"^3-001",Race_min_01 ); ELSE closePrivButton("race_min_01"); ENDIF ENDIF IF ($Race_value != "hour(s)") THEN IF ($Race <= 10) THEN closePrivButton("race_min_10"); closePrivButton("race_min_100"); ELSE IF ($Race < 100) THEN closePrivButton("race_min_100"); openPrivButton( "race_min_10",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3-010",Race_min_10 ); ELSE IF ($Race == 100) THEN closePrivButton("race_min_100"); openPrivButton( "race_min_10",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3-010",Race_min_10 ); ELSE openPrivButton( "race_min_10",$Admin_left_right+16,$Admin_top_bottom+108,5,5,5,-1,96,"^3-010",Race_min_10 ); openPrivButton( "race_min_100",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3-100",Race_min_100 ); ENDIF ENDIF ENDIF ELSE IF ($Race > 10) THEN openPrivButton( "race_min_10",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3-010",Race_min_10 ); ELSE IF ($Race <= 10) THEN closePrivButton("race_min_10"); ENDIF ENDIF ENDIF IF ($Race_value != "hour(s)") THEN IF ($Race == 1) THEN openPrivButton( "race_plus_01",$Admin_left_right+16,$Admin_top_bottom+108,5,5,5,-1,96,"^3+001",Race_plus_01 ); ELSE IF ($Race <=10) THEN openPrivButton( "race_plus_01",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3+001",Race_plus_01 ); ELSE IF ($Race < 100) THEN openPrivButton( "race_plus_01",$Admin_left_right+30,$Admin_top_bottom+108,5,5,5,-1,96,"^3+001",Race_plus_01 ); ELSE closePrivButton("race_plus_01"); ENDIF ENDIF ENDIF ELSE IF ($Race == 1) THEN openPrivButton( "race_plus_01",$Admin_left_right+16,$Admin_top_bottom+108,5,5,5,-1,96,"^3+001",Race_plus_01 ); ELSE IF ($Race > 1 && $Race <= 10) THEN openPrivButton( "race_plus_01",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3+001",Race_plus_01 ); ELSE IF ($Race > 10 && $Race <= 47) THEN openPrivButton( "race_plus_01",$Admin_left_right+30,$Admin_top_bottom+108,5,5,5,-1,96,"^3+001",Race_plus_01 ); ELSE IF ($Race == 48) THEN closePrivButton("race_plus_01"); ENDIF ENDIF ENDIF ENDIF ENDIF IF ($Race_value != "hour(s)") THEN IF ($Race == 1) THEN closePrivButton("race_plus_10"); closePrivButton("race_plus_100"); openPrivButton( "race_plus_10",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); ELSE IF ($Race <=10) THEN closePrivButton("race_plus_10"); closePrivButton("race_plus_100"); openPrivButton( "race_plus_10",$Admin_left_right+30,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); ELSE IF ($Race <= 90) THEN closePrivButton("race_plus_10"); closePrivButton("race_plus_100"); openPrivButton( "race_plus_10",$Admin_left_right+37,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); ELSE IF ($Race > 90 && $Race < 100) THEN closePrivButton("race_plus_10"); closePrivButton("race_plus_100"); ELSE IF ($Race >=100 && $Race <= 900) THEN closePrivButton("race_plus_10"); closePrivButton("race_plus_100"); openPrivButton( "race_plus_10",$Admin_left_right+30,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); openPrivButton( "race_plus_100",$Admin_left_right+37,$Admin_top_bottom+108,5,5,5,-1,96,"^3+100",Race_plus_100 ); ELSE IF ($Race >900 && $Race < 1000) THEN closePrivButton("race_plus_100"); openPrivButton( "race_plus_10",$Admin_left_right+30,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); ELSE IF ($Race == 1000) THEN closePrivButton("race_plus_10"); closePrivButton("race_plus_100"); ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ELSE IF ($Race == 1) THEN openPrivButton( "race_plus_10",$Admin_left_right+23,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); ELSE IF ($Race > 1 && $Race <= 10) THEN openPrivButton( "race_plus_10",$Admin_left_right+30,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); ELSE IF ($Race > 10 && $Race <= 37) THEN openPrivButton( "race_plus_10",$Admin_left_right+37,$Admin_top_bottom+108,5,5,5,-1,96,"^3+010",Race_plus_10 ); ELSE IF ($Race > 37) THEN closePrivButton("race_plus_10"); ENDIF ENDIF ENDIF ENDIF ENDIF openPrivButton( "race_info",$Admin_left_right+51,$Admin_top_bottom+108,12,5,5,-1,16,"^7" . $Race . " " . $Race_value ); ### END ### ### Set Qualify / Race ### openPrivButton( "set_qualify",$Admin_left_right+2,$Admin_top_bottom+115,31,5,5,-1,32,"^7Set qualify",Set_qualify ); openPrivButton( "set_race",$Admin_left_right+33,$Admin_top_bottom+115,31,5,5,-1,32,"^7Set race",Set_race ); ### End #### ### Start Qualify / Race ### openPrivButton( "start_qualify",$Admin_left_right+2,$Admin_top_bottom+122,31,5,5,-1,32,"^7Start qualify",Start_qualify ); openPrivButton( "start_race",$Admin_left_right+33,$Admin_top_bottom+122,31,5,5,-1,32,"^7Start race",Start_race ); ### End #### ### Number of stops / Pitwindow ### IF ($number_of_stops == "" || $number_of_stops >= 0) THEN openPrivButton( "pitwindow_bg",$Admin_left_right+1,$Admin_top_bottom+130,64,28,5,-1,16,"" ); openPrivButton( "pitwindow_title",$Admin_left_right+2,$Admin_top_bottom+130,62,5,5,-1,0,"^7Number of stops / Pitwindow:" ); openPrivButton( "stops",$Admin_left_right+2,$Admin_top_bottom+136,12,5,5,-1,64,"^3Stops:" ); openPrivButton( "stops_clear",$Admin_left_right+16,$Admin_top_bottom+136,5,5,5,-1,32,"^3CLR", Stops_clear ); openPrivButton( "stops_min",$Admin_left_right+30,$Admin_top_bottom+136,5,5,5,-1,32,"^3-", Stops_min ); openPrivButton( "stops_value",$Admin_left_right+37,$Admin_top_bottom+136,5,5,5,-1,16,"^7 " . $number_of_stops ); openPrivButton( "stops_plus",$Admin_left_right+44,$Admin_top_bottom+136,5,5,5,-1,32,"^3+", Stops_plus ); openPrivButton( "pitwindowstart",$Admin_left_right+2,$Admin_top_bottom+144,12,5,5,-1,64,"^3PW start:" ); openPrivButton( "pitwindowstart_clear",$Admin_left_right+16,$Admin_top_bottom+144,5,5,5,-1,32,"^3CLR", Pitwindow_1_clear ); openPrivButton( "pitwindowstart_min_1",$Admin_left_right+23,$Admin_top_bottom+144,5,5,5,-1,32,"^3-01", Pitwindow_1_min_1 ); openPrivButton( "pitwindowstart_min_5",$Admin_left_right+30,$Admin_top_bottom+144,5,5,5,-1,32,"^3-05", Pitwindow_1_min_5 ); openPrivButton( "pitwindowstart_value",$Admin_left_right+37,$Admin_top_bottom+144,5,5,5,-1,16,"^7 " . $Pitwindow_1_value ); openPrivButton( "pitwindowstart_plus_1",$Admin_left_right+44,$Admin_top_bottom+144,5,5,5,-1,32,"^3+01", Pitwindow_1_plus_1 ); openPrivButton( "pitwindowstart_plus_5",$Admin_left_right+51,$Admin_top_bottom+144,5,5,5,-1,32,"^3+05", Pitwindow_1_plus_5 ); openPrivButton( "pitwindowstart_set",$Admin_left_right+58,$Admin_top_bottom+144,5,5,5,-1,32,"^3Set", Pitwindow_1_set ); openPrivButton( "pitwindowstop",$Admin_left_right+2,$Admin_top_bottom+152,12,5,5,-1,64,"^3PW stop:" ); openPrivButton( "pitwindowstop_clear",$Admin_left_right+16,$Admin_top_bottom+152,5,5,5,-1,32,"^3CLR", Pitwindow_2_clear ); openPrivButton( "pitwindowstop_min_1",$Admin_left_right+23,$Admin_top_bottom+152,5,5,5,-1,32,"^3-01", Pitwindow_2_min_1 ); openPrivButton( "pitwindowstop_min_5",$Admin_left_right+30,$Admin_top_bottom+152,5,5,5,-1,32,"^3-05", Pitwindow_2_min_5 ); openPrivButton( "pitwindowstop_value",$Admin_left_right+37,$Admin_top_bottom+152,5,5,5,-1,16,"^7 " . $Pitwindow_2_value ); openPrivButton( "pitwindowstop_plus_1",$Admin_left_right+44,$Admin_top_bottom+152,5,5,5,-1,32,"^3+01", Pitwindow_2_plus_1 ); openPrivButton( "pitwindowstop_plus_5",$Admin_left_right+51,$Admin_top_bottom+152,5,5,5,-1,32,"^3+05", Pitwindow_2_plus_5 ); openPrivButton( "pitwindowstop_set",$Admin_left_right+58,$Admin_top_bottom+152,5,5,5,-1,32,"^3Set", Pitwindow_2_set ); ENDIF ### End ### ### Cars ### openPrivButton( "cars_bg",$Admin_left_right+67,$Admin_top_bottom+1,64,62,5,-1,16,"" ); openPrivButton( "cars_title",$Admin_left_right+68,$Admin_top_bottom+2,62,5,5,-1,0,"^7Cars:" ); IF ($Car_UF1 == 1 || $Car_Road == 1 || $Car_All == 1) THEN openPrivButton( "car_uf1",$Admin_left_right+82,$Admin_top_bottom+8,5,5,5,-1,96,"^2UF1",Set_UF1 ); ELSE openPrivButton( "car_uf1",$Admin_left_right+82,$Admin_top_bottom+8,5,5,5,-1,96,"^3UF1",Set_UF1 ); ENDIF IF ($Car_XFG == 1 || $Car_Road == 1 || $Car_All == 1) THEN openPrivButton( "car_xfg",$Admin_left_right+89,$Admin_top_bottom+8,5,5,5,-1,96,"^2XFG",Set_XFG ); ELSE openPrivButton( "car_xfg",$Admin_left_right+89,$Admin_top_bottom+8,5,5,5,-1,96,"^3XFG",Set_XFG ); ENDIF IF ($Car_XRG == 1 || $Car_Road == 1 || $Car_All == 1) THEN openPrivButton( "car_xrg",$Admin_left_right+96,$Admin_top_bottom+8,5,5,5,-1,96,"^2XRG",Set_XRG ); ELSE openPrivButton( "car_xrg",$Admin_left_right+96,$Admin_top_bottom+8,5,5,5,-1,96,"^3XRG",Set_XRG ); ENDIF IF ($Car_LX4 == 1 || $Car_Road == 1 || $Car_All == 1) THEN openPrivButton( "car_lx4",$Admin_left_right+103,$Admin_top_bottom+8,5,5,5,-1,96,"^2LX4",Set_LX4 ); ELSE openPrivButton( "car_lx4",$Admin_left_right+103,$Admin_top_bottom+8,5,5,5,-1,96,"^3LX4",Set_LX4 ); ENDIF IF ($Car_LX6 == 1 || $Car_Road == 1 || $Car_All == 1 || $Car_LRF == 1) THEN openPrivButton( "car_lx6",$Admin_left_right+110,$Admin_top_bottom+8,5,5,5,-1,96,"^2LX6",Set_LX6 ); ELSE openPrivButton( "car_lx6",$Admin_left_right+110,$Admin_top_bottom+8,5,5,5,-1,96,"^3LX6",Set_LX6 ); ENDIF IF ($Car_RB4 == 1 || $Car_Road == 1 || $Car_All == 1 || $Car_TBO == 1) THEN openPrivButton( "car_rb4",$Admin_left_right+82,$Admin_top_bottom+15,5,5,5,-1,96,"^2RB4",Set_RB4 ); ELSE openPrivButton( "car_rb4",$Admin_left_right+82,$Admin_top_bottom+15,5,5,5,-1,96,"^3RB4",Set_RB4 ); ENDIF IF ($Car_FXO == 1 || $Car_Road == 1 || $Car_All == 1 || $Car_TBO == 1) THEN openPrivButton( "car_fxo",$Admin_left_right+89,$Admin_top_bottom+15,5,5,5,-1,96,"^2FXO",Set_FXO ); ELSE openPrivButton( "car_fxo",$Admin_left_right+89,$Admin_top_bottom+15,5,5,5,-1,96,"^3FXO",Set_FXO ); ENDIF IF ($Car_XRT == 1 || $Car_Road == 1 || $Car_All == 1 || $Car_TBO == 1) THEN openPrivButton( "car_xrt",$Admin_left_right+96,$Admin_top_bottom+15,5,5,5,-1,96,"^2XRT",Set_XRT ); ELSE openPrivButton( "car_xrt",$Admin_left_right+96,$Admin_top_bottom+15,5,5,5,-1,96,"^3XRT",Set_XRT ); ENDIF IF ($Car_RAC == 1 || $Car_Road == 1 || $Car_All == 1 || $Car_LRF == 1) THEN openPrivButton( "car_rac",$Admin_left_right+103,$Admin_top_bottom+15,5,5,5,-1,96,"^2RAC",Set_RAC ); ELSE openPrivButton( "car_rac",$Admin_left_right+103,$Admin_top_bottom+15,5,5,5,-1,96,"^3RAC",Set_RAC ); ENDIF IF ($Car_FZ5 == 1 || $Car_Road == 1 || $Car_All == 1 || $Car_LRF == 1) THEN openPrivButton( "car_fz5",$Admin_left_right+110,$Admin_top_bottom+15,5,5,5,-1,96,"^2FZ5",Set_FZ5 ); ELSE openPrivButton( "car_fz5",$Admin_left_right+110,$Admin_top_bottom+15,5,5,5,-1,96,"^3FZ5",Set_FZ5 ); ENDIF IF ($Car_UFR == 1 || $Car_Race == 1 || $Car_All == 1) THEN openPrivButton( "car_ufr",$Admin_left_right+82,$Admin_top_bottom+22,5,5,5,-1,96,"^2UFR",Set_UFR ); ELSE openPrivButton( "car_ufr",$Admin_left_right+82,$Admin_top_bottom+22,5,5,5,-1,96,"^3UFR",Set_UFR ); ENDIF IF ($Car_XFR == 1 || $Car_Race == 1 || $Car_All == 1) THEN openPrivButton( "car_xfr",$Admin_left_right+89,$Admin_top_bottom+22,5,5,5,-1,96,"^2XFR",Set_XFR ); ELSE openPrivButton( "car_xfr",$Admin_left_right+89,$Admin_top_bottom+22,5,5,5,-1,96,"^3XFR",Set_XFR ); ENDIF IF ($Car_FXR == 1 || $Car_Race == 1 || $Car_All == 1 || $Car_GTR == 1) THEN openPrivButton( "car_fxr",$Admin_left_right+96,$Admin_top_bottom+22,5,5,5,-1,96,"^2FXR",Set_FXR ); ELSE openPrivButton( "car_fxr",$Admin_left_right+96,$Admin_top_bottom+22,5,5,5,-1,96,"^3FXR",Set_FXR ); ENDIF IF ($Car_XRR == 1 || $Car_Race == 1 || $Car_All == 1 || $Car_GTR == 1) THEN openPrivButton( "car_xrr",$Admin_left_right+103,$Admin_top_bottom+22,5,5,5,-1,96,"^2XRR",Set_XRR ); ELSE openPrivButton( "car_xrr",$Admin_left_right+103,$Admin_top_bottom+22,5,5,5,-1,96,"^3XRR",Set_XRR ); ENDIF IF ($Car_FZR == 1 || $Car_Race == 1 || $Car_All == 1 || $Car_GTR == 1) THEN openPrivButton( "car_fzr",$Admin_left_right+110,$Admin_top_bottom+22,5,5,5,-1,96,"^2FZR",Set_FZR ); ELSE openPrivButton( "car_fzr",$Admin_left_right+110,$Admin_top_bottom+22,5,5,5,-1,96,"^3FZR",Set_FZR ); ENDIF IF ($Car_MRT == 1 || $Car_All == 1) THEN openPrivButton( "car_mrt",$Admin_left_right+82,$Admin_top_bottom+29,5,5,5,-1,96,"^2MRT",Set_MRT ); ELSE openPrivButton( "car_mrt",$Admin_left_right+82,$Admin_top_bottom+29,5,5,5,-1,96,"^3MRT",Set_MRT ); ENDIF IF ($Car_FBM == 1 || $Car_Race == 1 || $Car_All == 1) THEN openPrivButton( "car_fbm",$Admin_left_right+89,$Admin_top_bottom+29,5,5,5,-1,96,"^2FBM",Set_FBM ); ELSE openPrivButton( "car_fbm",$Admin_left_right+89,$Admin_top_bottom+29,5,5,5,-1,96,"^3FBM",Set_FBM ); ENDIF IF ($Car_FOX == 1 || $Car_Race == 1 || $Car_All == 1) THEN openPrivButton( "car_fox",$Admin_left_right+96,$Admin_top_bottom+29,5,5,5,-1,96,"^2FOX",Set_FOX ); ELSE openPrivButton( "car_fox",$Admin_left_right+96,$Admin_top_bottom+29,5,5,5,-1,96,"^3FOX",Set_FOX ); ENDIF IF ($Car_FO8 == 1 || $Car_Race == 1 || $Car_All == 1) THEN openPrivButton( "car_fo8",$Admin_left_right+103,$Admin_top_bottom+29,5,5,5,-1,96,"^2FO8",Set_FO8 ); ELSE openPrivButton( "car_fo8",$Admin_left_right+103,$Admin_top_bottom+29,5,5,5,-1,96,"^3FO8",Set_FO8 ); ENDIF IF ($Car_BF1 == 1 || $Car_Race == 1 || $Car_All == 1) THEN openPrivButton( "car_bf1",$Admin_left_right+110,$Admin_top_bottom+29,5,5,5,-1,96,"^2BF1",Set_BF1 ); ELSE openPrivButton( "car_bf1",$Admin_left_right+110,$Admin_top_bottom+29,5,5,5,-1,96,"^3BF1",Set_BF1 ); ENDIF IF ($Car_All == 1) THEN openPrivButton( "cars_all",$Admin_left_right+68,$Admin_top_bottom+36,19,5,5,-1,32,"^2All",Set_All ); ELSE openPrivButton( "cars_all",$Admin_left_right+68,$Admin_top_bottom+36,19,5,5,-1,32,"^3All",Set_All ); ENDIF IF ($Car_Road == 1) THEN openPrivButton( "cars_road",$Admin_left_right+89,$Admin_top_bottom+36,20,5,5,-1,32,"^2Road",Set_Road ); ELSE openPrivButton( "cars_road",$Admin_left_right+89,$Admin_top_bottom+36,20,5,5,-1,32,"^3Road",Set_Road ); ENDIF IF ($Car_Race == 1) THEN openPrivButton( "cars_race",$Admin_left_right+111,$Admin_top_bottom+36,19,5,5,-1,32,"^2Race",Set_Race ); ELSE openPrivButton( "cars_race",$Admin_left_right+111,$Admin_top_bottom+36,19,5,5,-1,32,"^3Race",Set_Race ); ENDIF IF ($Car_TBO == 1) THEN openPrivButton( "cars_tbo",$Admin_left_right+68,$Admin_top_bottom+43,19,5,5,-1,32,"^2TBO",Set_TBO ); ELSE openPrivButton( "cars_tbo",$Admin_left_right+68,$Admin_top_bottom+43,19,5,5,-1,32,"^3TBO",Set_TBO ); ENDIF IF ($Car_LRF == 1) THEN openPrivButton( "cars_lrf",$Admin_left_right+89,$Admin_top_bottom+43,20,5,5,-1,32,"^2LRF",Set_LRF ); ELSE openPrivButton( "cars_lrf",$Admin_left_right+89,$Admin_top_bottom+43,20,5,5,-1,32,"^3LRF",Set_LRF ); ENDIF IF ($Car_GTR == 1) THEN openPrivButton( "cars_gtr",$Admin_left_right+111,$Admin_top_bottom+43,19,5,5,-1,32,"^2GTR",Set_GTR ); ELSE openPrivButton( "cars_gtr",$Admin_left_right+111,$Admin_top_bottom+43,19,5,5,-1,32,"^3GTR",Set_GTR ); ENDIF ### End ### ### Set Car(s) ### openPrivButton( "set_cars",$Admin_left_right+68,$Admin_top_bottom+57,62,5,5,-1,32,"^7Set car(s)",Set_cars); ### End #### ### Miscellaneous ### openPrivButton( "miscellaneous_bg",$Admin_left_right+67,$Admin_top_bottom+65,64,93,5,-1,16,"" ); openPrivButton( "miscellaneous_title",$Admin_left_right+68,$Admin_top_bottom+66,62,5,5,-1,0,"^7Miscellaneous:" ); openPrivButton( "start",$Admin_left_right+68,$Admin_top_bottom+72,12,5,5,-1,64,"^3Start:" ); IF ($Start == "Finish") THEN openPrivButton( "start_finish",$Admin_left_right+82,$Admin_top_bottom+72,12,5,5,-1,32,"^2Finish", Set_start_finish ); ELSE openPrivButton( "start_finish",$Admin_left_right+82,$Admin_top_bottom+72,12,5,5,-1,32,"^3Finish", Set_start_finish ); ENDIF IF ($Start == "Reverse") THEN openPrivButton( "start_reverse",$Admin_left_right+96,$Admin_top_bottom+72,12,5,5,-1,32,"^2Reverse", Set_start_reverse ); ELSE openPrivButton( "start_reverse",$Admin_left_right+96,$Admin_top_bottom+72,12,5,5,-1,32,"^3Reverse", Set_start_reverse ); ENDIF IF ($Start == "Random") THEN openPrivButton( "start_random",$Admin_left_right+110,$Admin_top_bottom+72,12,5,5,-1,32,"^2Random", Set_start_random ); ELSE openPrivButton( "start_random",$Admin_left_right+110,$Admin_top_bottom+72,12,5,5,-1,32,"^3Random", Set_start_random ); ENDIF openPrivButton( "must_pit",$Admin_left_right+68,$Admin_top_bottom+79,12,5,5,-1,64,"^3Must pit:" ); IF ($Must_pit == "Yes") THEN openPrivButton( "must_pit_yes",$Admin_left_right+82,$Admin_top_bottom+79,5,5,5,-1,96,"^2Yes", Set_must_pit_yes ); ELSE openPrivButton( "must_pit_yes",$Admin_left_right+82,$Admin_top_bottom+79,5,5,5,-1,96,"^3Yes", Set_must_pit_yes ); ENDIF IF ($Must_pit == "No") THEN openPrivButton( "must_pit_no",$Admin_left_right+89,$Admin_top_bottom+79,5,5,5,-1,96,"^2No", Set_must_pit_no ); ELSE openPrivButton( "must_pit_no",$Admin_left_right+89,$Admin_top_bottom+79,5,5,5,-1,96,"^3No", Set_must_pit_no ); ENDIF openPrivButton( "can_reset",$Admin_left_right+68,$Admin_top_bottom+86,12,5,5,-1,64,"^3Can reset:" ); IF ($Can_reset == "Yes") THEN openPrivButton( "can_reset_yes",$Admin_left_right+82,$Admin_top_bottom+86,5,5,5,-1,96,"^2Yes",Set_can_reset_yes ); ELSE openPrivButton( "can_reset_yes",$Admin_left_right+82,$Admin_top_bottom+86,5,5,5,-1,96,"^3Yes",Set_can_reset_yes ); ENDIF IF ($Can_reset == "No") THEN openPrivButton( "can_reset_no",$Admin_left_right+89,$Admin_top_bottom+86,5,5,5,-1,96,"^2No",Set_can_reset_no ); ELSE openPrivButton( "can_reset_no",$Admin_left_right+89,$Admin_top_bottom+86,5,5,5,-1,96,"^3No",Set_can_reset_no ); ENDIF openPrivButton( "can_vote",$Admin_left_right+68,$Admin_top_bottom+94,12,5,5,-1,64,"^3Can vote:" ); IF ($Can_vote == "Yes") THEN openPrivButton( "can_vote_yes",$Admin_left_right+82,$Admin_top_bottom+94,5,5,5,-1,96,"^2Yes",Set_can_vote_yes ); ELSE openPrivButton( "can_vote_yes",$Admin_left_right+82,$Admin_top_bottom+94,5,5,5,-1,96,"^3Yes",Set_can_vote_yes ); ENDIF IF ($Can_vote == "No") THEN openPrivButton( "can_vote_no",$Admin_left_right+89,$Admin_top_bottom+94,5,5,5,-1,96,"^2No",Set_can_vote_no ); ELSE openPrivButton( "can_vote_no",$Admin_left_right+89,$Admin_top_bottom+94,5,5,5,-1,96,"^3No",Set_can_vote_no ); ENDIF openPrivButton( "can_select",$Admin_left_right+68,$Admin_top_bottom+101,12,5,5,-1,64,"^3Can select:" ); IF ($Can_select == "Yes") THEN openPrivButton( "can_select_yes",$Admin_left_right+82,$Admin_top_bottom+101,5,5,5,-1,96,"^2Yes",Set_can_select_yes ); ELSE openPrivButton( "can_select_yes",$Admin_left_right+82,$Admin_top_bottom+101,5,5,5,-1,96,"^3Yes",Set_can_select_yes ); ENDIF IF ($Can_select == "No") THEN openPrivButton( "can_select_no",$Admin_left_right+89,$Admin_top_bottom+101,5,5,5,-1,96,"^2No",Set_can_select_no ); ELSE openPrivButton( "can_select_no",$Admin_left_right+89,$Admin_top_bottom+101,5,5,5,-1,96,"^3No",Set_can_select_no ); ENDIF openPrivButton( "autokick",$Admin_left_right+68,$Admin_top_bottom+108,12,5,5,-1,64,"^3Autokick:" ); IF ($Autokick == "No") THEN openPrivButton( "autokick_no",$Admin_left_right+82,$Admin_top_bottom+108,5,5,5,-1,96,"^2No",Set_autokick_no ); ELSE openPrivButton( "autokick_no",$Admin_left_right+82,$Admin_top_bottom+108,5,5,5,-1,96,"^3No",Set_autokick_no ); ENDIF IF ($Autokick == "Kick") THEN openPrivButton( "autokick_kick",$Admin_left_right+89,$Admin_top_bottom+108,5,5,5,-1,96,"^2Kick",Set_autokick_kick ); ELSE openPrivButton( "autokick_kick",$Admin_left_right+89,$Admin_top_bottom+108,5,5,5,-1,96,"^3Kick",Set_autokick_kick ); ENDIF IF ($Autokick == "Ban") THEN openPrivButton( "autokick_ban",$Admin_left_right+96,$Admin_top_bottom+108,5,5,5,-1,96,"^2Ban",Set_autokick_ban ); ELSE openPrivButton( "autokick_ban",$Admin_left_right+96,$Admin_top_bottom+108,5,5,5,-1,96,"^3Ban",Set_autokick_ban ); ENDIF IF ($Autokick == "Spec") THEN openPrivButton( "autokick_spec",$Admin_left_right+103,$Admin_top_bottom+108,5,5,5,-1,96,"^2Spec",Set_autokick_spec ); ELSE openPrivButton( "autokick_spec",$Admin_left_right+103,$Admin_top_bottom+108,5,5,5,-1,96,"^3Spec",Set_autokick_spec ); ENDIF openPrivButton( "midrace",$Admin_left_right+68,$Admin_top_bottom+115,12,5,5,-1,64,"^3Midrace:" ); IF ($Midrace == "Yes") THEN openPrivButton( "midrace_yes",$Admin_left_right+82,$Admin_top_bottom+115,5,5,5,-1,96,"^2Yes",Set_midrace_yes ); ELSE openPrivButton( "midrace_yes",$Admin_left_right+82,$Admin_top_bottom+115,5,5,5,-1,96,"^3Yes",Set_midrace_yes ); ENDIF IF ($Midrace == "No") THEN openPrivButton( "midrace_no",$Admin_left_right+89,$Admin_top_bottom+115,5,5,5,-1,96,"^2No",Set_midrace_no ); ELSE openPrivButton( "midrace_no",$Admin_left_right+89,$Admin_top_bottom+115,5,5,5,-1,96,"^3No",Set_midrace_no ); ENDIF openPrivButton( "force_cpv",$Admin_left_right+68,$Admin_top_bottom+122,12,5,5,-1,64,"^3Force CPV:" ); IF ($Force_CPV == "Yes") THEN openPrivButton( "force_cpv_yes",$Admin_left_right+82,$Admin_top_bottom+122,5,5,5,-1,96,"^2Yes",Set_force_cpv_yes ); ELSE openPrivButton( "force_cpv_yes",$Admin_left_right+82,$Admin_top_bottom+122,5,5,5,-1,96,"^3Yes",Set_force_cpv_yes ); ENDIF IF ($Force_CPV == "No") THEN openPrivButton( "force_cpv_no",$Admin_left_right+89,$Admin_top_bottom+122,5,5,5,-1,96,"^2No",Set_force_cpv_no ); ELSE openPrivButton( "force_cpv_no",$Admin_left_right+89,$Admin_top_bottom+122,5,5,5,-1,96,"^3No",Set_force_cpv_no ); ENDIF openPrivButton( "cruise",$Admin_left_right+68,$Admin_top_bottom+129,12,5,5,-1,64,"^3Cruise:" ); IF ($Cruise == "Yes") THEN openPrivButton( "cruise_yes",$Admin_left_right+82,$Admin_top_bottom+129,5,5,5,-1,96,"^2Yes",Set_cruise_yes ); ELSE openPrivButton( "cruise_yes",$Admin_left_right+82,$Admin_top_bottom+129,5,5,5,-1,96,"^3Yes",Set_cruise_yes ); ENDIF IF ($Cruise == "No") THEN openPrivButton( "cruise_no",$Admin_left_right+89,$Admin_top_bottom+129,5,5,5,-1,96,"^2No",Set_cruise_no ); ELSE openPrivButton( "cruise_no",$Admin_left_right+89,$Admin_top_bottom+129,5,5,5,-1,96,"^3No",Set_cruise_no ); ENDIF openPrivButton( "password",$Admin_left_right+68,$Admin_top_bottom+136,12,5,5,-1,64,"^3Password:" ); IF ($Password_status == "Set") THEN openPrivButton( "password_set",$Admin_left_right+82,$Admin_top_bottom+136,12,5,5,-1,32,"^2Set",Set_password ); ELSE openPrivButton( "password_set",$Admin_left_right+82,$Admin_top_bottom+136,12,5,5,-1,32,"^3Set",Set_password ); ENDIF IF ($Password_status == "Removed") THEN openPrivButton( "password_removed",$Admin_left_right+96,$Admin_top_bottom+136,12,5,5,-1,32,"^2Remove",Remove_password ); ELSE openPrivButton( "password_removed",$Admin_left_right+96,$Admin_top_bottom+136,12,5,5,-1,32,"^3Remove",Remove_password ); ENDIF openPrivButton( "misc_info",$Admin_left_right+68,$Admin_top_bottom+143,5,5,5,-1,64,"^7INF:" ); openPrivButton( "misc_info_b",$Admin_left_right+75,$Admin_top_bottom+143,55,5,5,-1,16,"^7" . $Misc_information ); ### End ### ### Close button ### openPrivButton( "close_admin_gui",$Admin_left_right+1,$Admin_top_bottom+160,130,10,5,-1,16,"^7CLOSE", Close ); ### End ### EndSub Sub Track_AS1() $Track="AS1"; $Information="Aston - Cadet"; $Weather="1"; MA_admin(); EndSub Sub Track_AS2() $Track="AS2"; $Information="Aston - Club"; $Weather="1"; MA_admin(); EndSub Sub Track_AS3() $Track="AS3"; $Information="Aston - National"; $Weather="1"; MA_admin(); EndSub Sub Track_AS4() $Track="AS4"; $Information="Aston - Historic"; $Weather="1"; MA_admin(); EndSub Sub Track_AS5() $Track="AS5"; $Information="Aston - Grand Prix"; $Weather="1"; MA_admin(); EndSub Sub Track_AS6() $Track="AS6"; $Information="Aston - Grand Touring"; $Weather="1"; MA_admin(); EndSub Sub Track_AS7() $Track="AS7"; $Information="Aston - North"; $Weather="1"; MA_admin(); EndSub Sub Track_BL1() $Track="BL1"; $Information="Blackwood - GP Track"; $Weather="1"; MA_admin(); EndSub Sub Track_BL2() $Track="BL2"; $Information="Blackwood - Rallycross"; $Weather="1"; MA_admin(); EndSub Sub Track_FE1() $Track="FE1"; $Information="Fern Bay - Club"; $Weather="1"; MA_admin(); EndSub Sub Track_FE2() $Track="FE2"; $Information="Fern Bay - Green"; $Weather="1"; MA_admin(); EndSub Sub Track_FE3() $Track="FE3"; $Information="Fern Bay - Gold"; $Weather="1"; MA_admin(); EndSub Sub Track_FE4() $Track="FE4"; $Information="Fern Bay - Black"; MA_admin(); EndSub Sub Track_FE5() $Track="FE5"; $Information="Fern Bay - Rallycross"; $Weather="1"; MA_admin(); EndSub Sub Track_FE6() $Track="FE6"; $Information="Fern Bay - RallyX Green"; $Weather="1"; MA_admin(); EndSub Sub Track_REV() IF ($Reverse == "") THEN $Reverse="R"; $Information_b="Reverse"; ELSE $Reverse=""; $Information_b=""; ENDIF MA_admin(); EndSub Sub Track_KY1() $Track="KY1"; $Information="Kyoto - Oval"; $Weather="1"; MA_admin(); EndSub Sub Track_KY2() $Track="KY2"; $Information="Kyoto - National"; $Weather="1"; MA_admin(); EndSub Sub Track_KY3() $Track="KY3"; $Information="Kyoto - GP Long"; $Weather="1"; MA_admin(); EndSub Sub Track_SO1() $Track="SO1"; $Information="South City - Classic"; $Weather="1"; MA_admin(); EndSub Sub Track_SO2() $Track="SO2"; $Information="South City - Sprint 1"; $Weather="1"; MA_admin(); EndSub Sub Track_SO3() $Track="SO3"; $Information="South City - Sprint 2"; $Weather="1"; MA_admin(); EndSub Sub Track_SO4() $Track="SO4"; $Information="South City - City Long"; $Weather="1"; MA_admin(); EndSub Sub Track_SO5() $Track="SO5"; $Information="South City - Town Course"; $Weather="1"; MA_admin(); EndSub Sub Track_SO6() $Track="SO6"; $Information="South City - Chicane Route"; $Weather="1"; MA_admin(); EndSub Sub Track_WE1() $Track="WE1"; $Information="Westhill - International"; $Weather="1"; MA_admin(); EndSub Sub Track_weather_1() $Weather="1"; MA_admin(); EndSub Sub Track_weather_2() $Weather="2"; MA_admin(); EndSub Sub Track_weather_3() $Weather="3"; MA_admin(); EndSub Sub Track_wind_0() $Wind="0"; MA_admin(); EndSub Sub Track_wind_1() $Wind="1"; MA_admin(); EndSub Sub Track_wind_2() $Wind="2"; MA_admin(); EndSub Sub End_race() cmdLFS("/end"); EndSub Sub Set_track() cmdLFS("/track " . $Track . $Reverse); EndSub Sub Set_weather() IF ($Weather != "") THEN cmdLFS("/weather " . $Weather ); ENDIF cmdLFS("/wind " . $Wind ); EndSub Sub Qual_no() $Qualify=0; MA_admin(); EndSub Sub Qual_min_01() IF ($Qualify > 0) THEN $Qualify=$Qualify-1; ENDIF MA_admin(); EndSub Sub Qual_min_10() IF ($Qualify >= 10) THEN $Qualify=$Qualify-10; ENDIF MA_admin(); EndSub Sub Qual_plus_01() IF ($Qualify < 60) THEN $Qualify=$Qualify+1; ENDIF MA_admin(); EndSub Sub Qual_plus_10() IF ($Qualify <= 50) THEN $Qualify=$Qualify+10; ENDIF MA_admin(); EndSub Sub Race_min_01() IF ($Race > 1) THEN $Race=$Race-1; ENDIF MA_admin(); EndSub Sub Race_min_10() IF ($Race_value != "hour(s)") THEN IF ($Race >= 10) THEN $Race=$Race-10; ENDIF ELSE IF ($Race >= 10) THEN $Race=$Race-10; ENDIF ENDIF MA_admin(); EndSub Sub Race_min_100() IF ($Race >= 110) THEN $Race=$Race-100; ENDIF MA_admin(); EndSub Sub Race_plus_01() IF ($Race_value == "lap(s)") THEN IF ($Race <= 99) THEN $Race=$Race+1; ENDIF ELSE IF ($Race <=47) THEN $Race=$Race+1; ENDIF ENDIF MA_admin(); EndSub Sub Race_plus_10() IF ($Race_value != "hour(s)") THEN IF ($Race <= 990) THEN $Race=$Race+10; ENDIF ELSE IF ($Race <= 38) THEN $Race=$Race+10; ENDIF ENDIF MA_admin(); EndSub Sub Race_plus_100() IF ($Race <= 900) THEN $Race=$Race+100; ENDIF MA_admin(); EndSub Sub Hours() IF ($Race_value != "hour(s)") THEN $Race_value="hour(s)"; $Race=1; closePrivButton("race_min_1&race_min_10&race_min_100&race_plus_1&race_plus_10&race_plus_100"); ELSE $Race_value="lap(s)"; $Race=1; closePrivButton("race_min_1&race_min_10&race_min_100&race_plus_1&race_plus_10&race_plus_100"); ENDIF MA_admin(); EndSub Sub Set_qualify() cmdLFS("/qual " . $Qualify); EndSub Sub Set_race() IF ($Race_value == "lap(s)") THEN cmdLFS("/laps " . $Race); ELSE cmdLFS("/hours " . $Race); ENDIF EndSub Sub Start_qualify() cmdLFS("/qualify"); EndSub Sub Start_race() cmdLFS("/restart"); EndSub Sub Stops_clear() $number_of_stops=""; $player_1_pitstops=$number_of_stops; $player_2_pitstops=$number_of_stops; $player_3_pitstops=$number_of_stops; $player_4_pitstops=$number_of_stops; $player_5_pitstops=$number_of_stops; $player_6_pitstops=$number_of_stops; $player_7_pitstops=$number_of_stops; $player_8_pitstops=$number_of_stops; $player_9_pitstops=$number_of_stops; $player_10_pitstops=$number_of_stops; $player_11_pitstops=$number_of_stops; $player_12_pitstops=$number_of_stops; $player_13_pitstops=$number_of_stops; $player_14_pitstops=$number_of_stops; $player_15_pitstops=$number_of_stops; $player_16_pitstops=$number_of_stops; $player_17_pitstops=$number_of_stops; $player_18_pitstops=$number_of_stops; $player_19_pitstops=$number_of_stops; $player_20_pitstops=$number_of_stops; $player_21_pitstops=$number_of_stops; $player_22_pitstops=$number_of_stops; $player_23_pitstops=$number_of_stops; $player_24_pitstops=$number_of_stops; $player_25_pitstops=$number_of_stops; $player_26_pitstops=$number_of_stops; $player_27_pitstops=$number_of_stops; $player_28_pitstops=$number_of_stops; $player_29_pitstops=$number_of_stops; $player_30_pitstops=$number_of_stops; $player_31_pitstops=$number_of_stops; $player_32_pitstops=$number_of_stops; MA_admin(); EndSub Sub Stops_min() IF ($number_of_stops >= 1) THEN $number_of_stops=$number_of_stops-1; $player_1_pitstops=$number_of_stops; $player_2_pitstops=$number_of_stops; $player_3_pitstops=$number_of_stops; $player_4_pitstops=$number_of_stops; $player_5_pitstops=$number_of_stops; $player_6_pitstops=$number_of_stops; $player_7_pitstops=$number_of_stops; $player_8_pitstops=$number_of_stops; $player_9_pitstops=$number_of_stops; $player_10_pitstops=$number_of_stops; $player_11_pitstops=$number_of_stops; $player_12_pitstops=$number_of_stops; $player_13_pitstops=$number_of_stops; $player_14_pitstops=$number_of_stops; $player_15_pitstops=$number_of_stops; $player_16_pitstops=$number_of_stops; $player_17_pitstops=$number_of_stops; $player_18_pitstops=$number_of_stops; $player_19_pitstops=$number_of_stops; $player_20_pitstops=$number_of_stops; $player_21_pitstops=$number_of_stops; $player_22_pitstops=$number_of_stops; $player_23_pitstops=$number_of_stops; $player_24_pitstops=$number_of_stops; $player_25_pitstops=$number_of_stops; $player_26_pitstops=$number_of_stops; $player_27_pitstops=$number_of_stops; $player_28_pitstops=$number_of_stops; $player_29_pitstops=$number_of_stops; $player_30_pitstops=$number_of_stops; $player_31_pitstops=$number_of_stops; $player_32_pitstops=$number_of_stops; ENDIF MA_admin(); EndSub Sub Stops_plus() $number_of_stops=$number_of_stops+1; $player_1_pitstops=$number_of_stops; $player_2_pitstops=$number_of_stops; $player_3_pitstops=$number_of_stops; $player_4_pitstops=$number_of_stops; $player_5_pitstops=$number_of_stops; $player_6_pitstops=$number_of_stops; $player_7_pitstops=$number_of_stops; $player_8_pitstops=$number_of_stops; $player_9_pitstops=$number_of_stops; $player_10_pitstops=$number_of_stops; $player_11_pitstops=$number_of_stops; $player_12_pitstops=$number_of_stops; $player_13_pitstops=$number_of_stops; $player_14_pitstops=$number_of_stops; $player_15_pitstops=$number_of_stops; $player_16_pitstops=$number_of_stops; $player_17_pitstops=$number_of_stops; $player_18_pitstops=$number_of_stops; $player_19_pitstops=$number_of_stops; $player_20_pitstops=$number_of_stops; $player_21_pitstops=$number_of_stops; $player_22_pitstops=$number_of_stops; $player_23_pitstops=$number_of_stops; $player_24_pitstops=$number_of_stops; $player_25_pitstops=$number_of_stops; $player_26_pitstops=$number_of_stops; $player_27_pitstops=$number_of_stops; $player_28_pitstops=$number_of_stops; $player_29_pitstops=$number_of_stops; $player_30_pitstops=$number_of_stops; $player_31_pitstops=$number_of_stops; $player_32_pitstops=$number_of_stops; MA_admin(); EndSub Sub Pitwindow_1_clear() $pitwindow_1=""; $Pitwindow_1_value=""; MA_admin(); EndSub Sub Pitwindow_1_min_1() IF ($Pitwindow_1_value >= 1) THEN $Pitwindow_1_value=$Pitwindow_1_value-1; ENDIF MA_admin(); EndSub Sub Pitwindow_1_min_5() IF ($Pitwindow_1_value >= 5) THEN $Pitwindow_1_value=$Pitwindow_1_value-5; ENDIF MA_admin(); EndSub Sub Pitwindow_1_plus_1() $Pitwindow_1_value=$Pitwindow_1_value+1; MA_admin(); EndSub Sub Pitwindow_1_plus_5() $Pitwindow_1_value=$Pitwindow_1_value+5; MA_admin(); EndSub Sub Pitwindow_1_set() $pitwindow_1=$Pitwindow_1_value-1; EndSub Sub Pitwindow_2_clear() $pitwindow_2=""; $Pitwindow_2_value=""; MA_admin(); EndSub Sub Pitwindow_2_min_1() IF ($Pitwindow_2_value >= 1) THEN $Pitwindow_2_value=$Pitwindow_2_value-1; ENDIF MA_admin(); EndSub Sub Pitwindow_2_min_5() IF ($Pitwindow_2_value >= 5) THEN $Pitwindow_2_value=$Pitwindow_2_value-5; ENDIF MA_admin(); EndSub Sub Pitwindow_2_plus_1() $Pitwindow_2_value=$Pitwindow_2_value+1; MA_admin(); EndSub Sub Pitwindow_2_plus_5() $Pitwindow_2_value=$Pitwindow_2_value+5; MA_admin(); EndSub Sub Pitwindow_2_set() $pitwindow_2=$Pitwindow_2_value; EndSub Sub Set_UF1() IF ($Car_UF1 == 0) THEN $Car_UF1=1; ELSE $Car_UF1=0; ENDIF MA_admin(); EndSub Sub Set_XFG() IF ($Car_XFG == 0) THEN $Car_XFG=1; ELSE $Car_XFG=0; ENDIF MA_admin(); EndSub Sub Set_XRG() IF ($Car_XRG == 0) THEN $Car_XRG=1; ELSE $Car_XRG=0; ENDIF MA_admin(); EndSub Sub Set_LX4() IF ($Car_LX4 == 0) THEN $Car_LX4=1; ELSE $Car_LX4=0; ENDIF MA_admin(); EndSub Sub Set_LX6() IF ($Car_LX6 == 0) THEN $Car_LX6=1; ELSE $Car_LX6=0; ENDIF MA_admin(); EndSub Sub Set_RB4() IF ($Car_RB4 == 0) THEN $Car_RB4=1; ELSE $Car_RB4=0; ENDIF MA_admin(); EndSub Sub Set_FXO() IF ($Car_FXO == 0) THEN $Car_FXO=1; ELSE $Car_FXO=0; ENDIF MA_admin(); EndSub Sub Set_XRT() IF ($Car_XRT == 0) THEN $Car_XRT=1; ELSE $Car_XRT=0; ENDIF MA_admin(); EndSub Sub Set_RAC() IF ($Car_RAC == 0) THEN $Car_RAC=1; ELSE $Car_RAC=0; ENDIF MA_admin(); EndSub Sub Set_FZ5() IF ($Car_FZ5 == 0) THEN $Car_FZ5=1; ELSE $Car_FZ5=0; ENDIF MA_admin(); EndSub Sub Set_UFR() IF ($Car_UFR == 0) THEN $Car_UFR=1; ELSE $Car_UFR=0; ENDIF MA_admin(); EndSub Sub Set_XFR() IF ($Car_XFR == 0) THEN $Car_XFR=1; ELSE $Car_XFR=0; ENDIF MA_admin(); EndSub Sub Set_FXR() IF ($Car_FXR == 0) THEN $Car_FXR=1; ELSE $Car_FXR=0; ENDIF MA_admin(); EndSub Sub Set_XRR() IF ($Car_XRR == 0) THEN $Car_XRR=1; ELSE $Car_XRR=0; ENDIF MA_admin(); EndSub Sub Set_FZR() IF ($Car_FZR == 0) THEN $Car_FZR=1; ELSE $Car_FZR=0; ENDIF MA_admin(); EndSub Sub Set_MRT() IF ($Car_MRT == 0) THEN $Car_MRT=1; ELSE $Car_MRT=0; ENDIF MA_admin(); EndSub Sub Set_FBM() IF ($Car_FBM == 0) THEN $Car_FBM=1; ELSE $Car_FBM=0; ENDIF MA_admin(); EndSub Sub Set_FOX() IF ($Car_FOX == 0) THEN $Car_FOX=1; ELSE $Car_FOX=0; ENDIF MA_admin(); EndSub Sub Set_FO8() IF ($Car_FO8 == 0) THEN $Car_FO8=1; ELSE $Car_FO8=0; ENDIF MA_admin(); EndSub Sub Set_BF1() IF ($Car_BF1 == 0) THEN $Car_BF1=1; ELSE $Car_BF1=0; ENDIF MA_admin(); EndSub Sub Set_Road() IF ($Car_Road == 0) THEN $Car_Road=1; $Car_UF1=1; $Car_XFG=1; $Car_XRG=1; $Car_LX4=1; $Car_LX6=1; $Car_RB4=1; $Car_FXO=1; $Car_XRT=1; $Car_RAC=1; $Car_FZ5=1; ELSE $Car_Road=0; $Car_UF1=0; $Car_XFG=0; $Car_XRG=0; $Car_LX4=0; $Car_LX6=0; $Car_RB4=0; $Car_FXO=0; $Car_XRT=0; $Car_RAC=0; $Car_FZ5=0; ENDIF MA_admin(); EndSub Sub Set_Race() IF ($Car_Race == 0) THEN $Car_Race=1; $Car_UFR=1; $Car_XFR=1; $Car_FXR=1; $Car_XRR=1; $Car_FZR=1; $Car_FBM=1; $Car_FOX=1; $Car_FO8=1; $Car_BF1=1; ELSE $Car_Race=0; $Car_UFR=0; $Car_XFR=0; $Car_FXR=0; $Car_XRR=0; $Car_FZR=0; $Car_FBM=0; $Car_FOX=0; $Car_FO8=0; $Car_BF1=0; ENDIF MA_admin(); EndSub Sub Set_All() $Car_Road=0; # deselect Roadcars to get clean sheet $Car_Race=0; # deselect Racecars to get clean sheet $Car_TBO=0; # deselect TBOcars to get clean sheet $Car_LRF=0; # deselect LRFcars to get clean sheet $Car_GTR=0; # deselect GTRcars to get clean sheet IF ($Car_All == 0) THEN $Car_All=1; $Car_UF1=1; $Car_XFG=1; $Car_XRG=1; $Car_LX4=1; $Car_LX6=1; $Car_RB4=1; $Car_FXO=1; $Car_XRT=1; $Car_RAC=1; $Car_FZ5=1; $Car_MRT=1; $Car_UFR=1; $Car_XFR=1; $Car_FXR=1; $Car_XRR=1; $Car_FZR=1; $Car_FBM=1; $Car_FOX=1; $Car_FO8=1; $Car_BF1=1; ELSE $Car_All=0; $Car_UF1=0; $Car_XFG=0; $Car_XRG=0; $Car_LX4=0; $Car_LX6=0; $Car_RB4=0; $Car_FXO=0; $Car_XRT=0; $Car_RAC=0; $Car_FZ5=0; $Car_MRT=0; $Car_UFR=0; $Car_XFR=0; $Car_FXR=0; $Car_XRR=0; $Car_FZR=0; $Car_FBM=0; $Car_FOX=0; $Car_FO8=0; $Car_BF1=0; ENDIF MA_admin(); EndSub Sub Set_TBO() IF ($Car_TBO == 0) THEN $Car_TBO=1; $Car_RB4=1; $Car_FXO=1; $Car_XRT=1; ELSE $Car_TBO=0; $Car_RB4=0; $Car_FXO=0; $Car_XRT=0; ENDIF MA_admin(); EndSub Sub Set_LRF() IF ($Car_LRF == 0) THEN $Car_LRF=1; $Car_LX6=1; $Car_RAC=1; $Car_FZ5=1; ELSE $Car_LRF=0; $Car_LX6=0; $Car_RAC=0; $Car_FZ5=0; ENDIF MA_admin(); EndSub Sub Set_GTR() IF ($Car_GTR == 0) THEN $Car_GTR=1; $Car_FXR=1; $Car_XRR=1; $Car_FZR=1; ELSE $Car_GTR=0; $Car_FXR=0; $Car_XRR=0; $Car_FZR=0; ENDIF MA_admin(); EndSub Sub Set_cars() $Cars=""; $Car_check="No"; IF ($Car_UF1 == 1) THEN $Cars="UF1"; $Car_check="Yes"; ENDIF IF ($Car_XFG == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+XFG"; ELSE $Cars="XFG"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_XRG == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+XRG"; ELSE $Cars="XRG"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_LX4 == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+LX4"; ELSE $Cars="LX4"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_LX6 == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+LX6"; ELSE $Cars="LX6"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_RB4 == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+RB4"; ELSE $Cars="RB4"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_FXO == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+FXO"; ELSE $Cars="FXO"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_XRT == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+XRT"; ELSE $Cars="XRT"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_RAC == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+RAC"; ELSE $Cars="RAC"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_FZ5 == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+FZ5"; ELSE $Cars="FZ5"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_UFR == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+UFR"; ELSE $Cars="UFR"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_XFR == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+XFR"; ELSE $Cars="XFR"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_FXR == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+FXR"; ELSE $Cars="FXR"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_XRR == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+XRR"; ELSE $Cars="XRR"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_FZR == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+FZR"; ELSE $Cars="FZR"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_MRT == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+MRT"; ELSE $Cars="MRT"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_FBM == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+FBM"; ELSE $Cars="FBM"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_FOX == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+FOX"; ELSE $Cars="FOX"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_FO8 == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+FO8"; ELSE $Cars="FO8"; $Car_check="Yes"; ENDIF ENDIF IF ($Car_BF1 == 1) THEN IF ($Car_check == "Yes") THEN $Cars=$Cars . "+BF1"; ELSE $Cars="BF1"; $Car_check="Yes"; ENDIF ENDIF cmdLFS("/cars " . $Cars); $DTC=$Cars; EndSub Sub Set_start_finish() $Start="Finish"; $Misc_information="Startorder set to last finish"; cmdLFS("/start finish"); MA_admin(); EndSub Sub Set_start_reverse() $Start="Reverse"; $Misc_information="Startorder set to reversed last finish"; cmdLFS("/start reverse"); MA_admin(); EndSub Sub Set_start_random() $Start="Random"; $Misc_information="Startorder set to random"; cmdLFS("/start random"); MA_admin(); EndSub Sub Set_must_pit_yes() $Must_pit="Yes"; $Misc_information="Mandatory pitstop set"; cmdLFS("/mustpit yes"); MA_admin(); EndSub Sub Set_must_pit_no() $Must_pit="No"; $Misc_information="Mandatory pitstop removed"; cmdLFS("/mustpit no"); MA_admin(); EndSub Sub Set_can_reset_yes() $Can_reset="Yes"; $Misc_information="Reset allowed"; cmdLFS("/canreset yes"); MA_admin(); EndSub Sub Set_can_reset_no() $Can_reset="No"; $Misc_information="Reset not allowed"; cmdLFS("/canreset no"); MA_admin(); EndSub Sub Set_can_vote_yes() $Can_vote="Yes"; $Misc_information="Votes against players allowed"; cmdLFS("/vote yes"); MA_admin(); EndSub Sub Set_can_vote_no() $Can_vote="No"; $Misc_information="Votes against players not allowed"; cmdLFS("/vote no"); MA_admin(); EndSub Sub Set_can_select_yes() $Can_select="Yes"; $Misc_information="Track selection allowed"; cmdLFS("/select yes"); MA_admin(); EndSub Sub Set_can_select_no() $Can_select="No"; $Misc_information="Track selection not allowed"; cmdLFS("/select no"); MA_admin(); EndSub Sub Set_autokick_no() $Autokick="No"; $Misc_information="Autokick is disabled"; cmdLFS("/autokick no"); MA_admin(); EndSub Sub Set_autokick_kick() $Autokick="Kick"; $Misc_information="Autokick is set to kick player"; cmdLFS("/autokick kick"); MA_admin(); EndSub Sub Set_autokick_ban() $Autokick="Ban"; $Misc_information="Autokick is set to ban player"; cmdLFS("/autokick ban"); MA_admin(); EndSub Sub Set_autokick_spec() $Autokick="Spec"; $Misc_information="Autokick is set to spectate player"; cmdLFS("/autokick spec"); MA_admin(); EndSub Sub Set_midrace_yes() $Midrace="Yes"; $Misc_information="Joining midrace is allowed"; cmdLFS("/midrace yes"); MA_admin(); EndSub Sub Set_midrace_no() $Midrace="No"; $Misc_information="Joining midrace is not allowed"; cmdLFS("/midrace no"); MA_admin(); EndSub Sub Set_force_cpv_yes() $Force_CPV="Yes"; $Misc_information="Cockpit view is forced"; cmdLFS("/fcv yes"); MA_admin(); EndSub Sub Set_force_cpv_no() $Force_CPV="No"; $Misc_information="Cockpit view is not forced"; cmdLFS("/fcv no"); MA_admin(); EndSub Sub Set_cruise_yes() $Cruise="Yes"; $Misc_information="Cruise (driving wrong way) allowed"; cmdLFS("/cruise yes"); MA_admin(); EndSub Sub Set_cruise_no() $Cruise="No"; $Misc_information="Cruise (driving wrong way) not allowed"; cmdLFS("/cruise no"); MA_admin(); EndSub Sub Set_password() $Password_status="Set"; $Misc_information="Predefined password set"; cmdLFS("/pass " . $Password); MA_admin(); EndSub Sub Remove_password() $Password_status="Removed"; $Misc_information="Predefined password removed"; cmdLFS("/pass"); MA_admin(); EndSub Sub Close() closePrivButton("admin_bg&tracks_bg&tracks_title"); closePrivButton("tracks_as&track_as1&track_as2&track_as3&track_as4&track_as5&track_as6&track_as7"); closePrivButton("tracks_bl&track_bl1&track_bl2"); closePrivButton("tracks_fe&track_fe1&track_fe2&track_fe3&track_fe4&track_fe5&track_fe6"); closePrivButton("track_rev"); closePrivButton("tracks_ky&track_ky1&track_ky2&track_ky3"); closePrivButton("tracks_so&track_so1&track_so2&track_so3&track_so4&track_so5&track_so6"); closePrivButton("tracks_we&track_we1"); closePrivButton("track_info&track_info_b"); closePrivButton("end_race&set_track"); closePrivButton("weather_bg&weather_title"); closePrivButton("track_weather_sunny&track_weather_cloudy&track_weather_cloudy_b&track_weather_sunset"); closePrivButton("track_weather_nowind&track_weather_lowwind&track_weather_highwind"); closePrivButton("set_weather"); closePrivButton("qualrace_bg&qualrace_title&qual&qual_no&qual_min_01&qual_min_10&qual_plus_01&qual_plus_10&qual_info"); closePrivButton("race&race_hours&race_min_01&race_min_10&race_min_100&race_plus_01&race_plus_10&race_plus_100&race_info"); closePrivButton("set_qualify&set_race&start_qualify&start_race"); closePrivButton("pitwindow_bg&pitwindow_title"); closePrivButton("stops&stops_clear&stops_min&stops_value&stops_plus"); closePrivButton("pitwindowstart&pitwindowstart_clear&pitwindowstart_min_1&pitwindowstart_min_5&pitwindowstart_value&pitwindowstart_plus_1&pitwindowstart_plus_5&pitwindowstart_set"); closePrivButton("pitwindowstop&pitwindowstop_clear&pitwindowstop_min_1&pitwindowstop_min_5&pitwindowstop_value&pitwindowstop_plus_1&pitwindowstop_plus_5&pitwindowstop_set"); closePrivButton("cars_bg&cars_title"); closePrivButton("car_uf1&car_xfg&car_xrg&car_lx4&car_lx6&car_rb4&car_fxo&car_xrt&car_rac&car_fz5&car_ufr&car_xfr&car_fxr&car_xrr&car_fzr&car_mrt&car_fbm&car_fox&car_fo8&car_bf1"); closePrivButton("cars_all&cars_road&cars_race&cars_tbo&cars_lrf&cars_gtr&set_cars"); closePrivButton("miscellaneous_bg&miscellaneous_title&start&start_finish&start_reverse&start_random&must_pit&must_pit_yes&must_pit_no&can_reset&can_reset_yes&can_reset_no"); closePrivButton("can_vote&can_vote_yes&can_vote_no&can_select&can_select_yes&can_select_no&autokick&autokick_no&autokick_kick&autokick_ban&autokick_spec&midrace&midrace_yes&midrace_no"); closePrivButton("force_cpv&force_cpv_yes&force_cpv_no&cruise&cruise_yes&cruise_no&password&password_set&password_removed&misc_info&misc_info_b&close_admin_gui"); EndSub Register MsgAction("!top",MA_top); # Can be removed if you're using Pitboard also Sub MA_top() IF ($argv == "") THEN top( $DTC ); ELSE IF ($argv != $DTC) THEN top ( $argv ); ENDIF ENDIF EndSub