########################## #Options for acceleration# ########################## $AccelerationStartSpeed = 1; # At which speed to start measuring time. In km/h $AccelerationEndSpeed = 100; # At which speed to stop measuring time. In km/h $AccelerationStartSpeedMph = 1; # At which speed to start measuring time. In Mph $AccelerationEndSpeedMph = 60; # At which speed to stop measuring time. In Mph $AccelerationPrivateMaxTime = 20; # Maximum acceleration time in seconds to show message #Message to show to players. #Possible variables to use: #{AccelerationStartSpeed} - Starting speed #{AccelerationEndSpeed} - Ending speed #{AccelerationTime} - Acceleration time achieved from start to end speed #{UnitSpeed} Unit of the Speed of the player connected Event OnAcceleration( $userName ) # Player event $NickName = GetCurrentPlayerVar("NickName"); closePrivButton( "blank_back&warning&warning1&info&impressive&remember&warning_message1&adjective&acceleration" ); closePrivButton( "swear_not_please&swear_not_kick&enterpits&leavepits&pitcareful&lowdrift&acceleration" ); openPrivButton( "blank_back",152,45,46,25,3,6,32," "); openPrivButton( "manhand1",164,70,3,15,1,8,32," "); openPrivButton( "manhand1a",164,70,3,15,1,8,32," "); openPrivButton( "manarm1",164,85,3,19,1,8,32," "); openPrivButton( "manarm1a",164,85,3,19,1,8,32," "); openPrivButton( "head1",171,84,10,16,1,8,32," "); openPrivButton( "head1a",171,90,10,10,1,8,32," "); openPrivButton( "white_band",171,85,10,4,1,8,16," "); openPrivButton( "marshall_hat",171,85,10,4,1,8,0,"^3= MARSHALL ="); openPrivButton( "yellow_trim",171,87,10,4,1,8,0,"^1--------"); openPrivButton( "earA",170,92,1,5,1,8,32," "); openPrivButton( "earB",181,92,1,5,1,8,32," "); openPrivButton( "earA1",170,92,1,5,1,8,32," "); openPrivButton( "earB1",181,92,1,5,1,8,32," "); openPrivButton( "eyeA",173,93,3,3,1,8,32,"^80"); openPrivButton( "eyeB",177,93,3,3,1,8,32,"^80"); openPrivButton( "mouth",175,97,3,3,1,8,32,"^1< === >"); openPrivButton( "yellow_flag1a",159,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag2a",160,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag3a",162,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag4a",164,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag5a",166,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag6a",168,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag7a",170,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag8a",172,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "yellow_flag9a",173,88,20,50,1,8,0,langEngine( "%{main_yellowflag1}%") ); openPrivButton( "manarm",185,103,10,5,1,8,32," "); openPrivButton( "manarma",185,103,10,5,1,8,32," "); openPrivButton( "manarm7",192,88,3,15,1,8,32," "); openPrivButton( "manarm7a",192,88,3,15,1,8,32," "); openPrivButton( "manlines",167,102,18,6,1,8,0,"^1==========="); openPrivButton( "man8",167,107,18,6,1,8,0,"^1= MARSHALL ="); openPrivButton( "manlines1",167,112,18,6,1,8,0,"^1==========="); openPrivButton( "clogo",169,117,14,6,1,8,0,"^2[c]"); openPrivButton( "manlogo",167,122,18,6,1,8,0,"^0S i n ' r s"); openPrivButton( "manll1",169,140,5,30,1,8,32," "); openPrivButton( "manll2",169,140,5,30,1,8,32," "); openPrivButton( "manrl1",178,140,5,30,1,8,32," "); openPrivButton( "manrl2",178,140,5,30,1,8,32," "); openPrivButton( "manlf",169,165,5,5,1,8,16," "); openPrivButton( "manrf",178,165,5,5,1,8,16," "); openPrivButton( "shorts1",168,130,16,10,1,8,32," "); openPrivButton( "shorts2",168,130,16,10,1,8,32," "); # Set the vars for the acceleration data $maxAccelerationTimes = 6; # How many possible acceleration times are there? $maxCars = 19; # How many possible acceleration times are there? $accelData[0] = "UF1,1,11,12,13,14,15,16"; $accelData[1] = "XFG,1,9,10,11,12,13,14"; $accelData[2] = "XRG,1,8,9,10,11,12,13"; $accelData[3] = "FXO,1,6,7,8,9,10,11"; $accelData[4] = "RB4,1,6,7,8,9,10,11"; $accelData[5] = "XRT,1,6,7,8,9,10,11"; $accelData[6] = "LX4,1,5,6,7,8,9,10"; $accelData[7] = "MRT,1,5,6,7,8,9,10"; $accelData[8] = "UFR,1,5,6,7,8,9,10"; $accelData[9] = "RAC,1,5,6,7,8,9,10"; $accelData[10] = "FZ5,1,5,6,7,8,9,10"; $accelData[11] = "LX6,1,5,6,7,8,9,10"; $accelData[12] = "FBM,1,5,6,7,8,9,10"; $accelData[13] = "FOX,1,4,5,6,7,8,9"; $accelData[14] = "XFR,1,4,5,6,7,8,9"; $accelData[15] = "XRR,1,4,5,6,7,8,9"; $accelData[16] = "FXR,1,4,5,6,7,8,9"; $accelData[17] = "FZR,1,3,4,5,6,7,8"; $accelData[18] = "FO8,1,3,4,5,6,7,8"; $accelData[19] = "BF1,1,3,4,5,6,7,8"; $PlayerCar = GetCurrentPlayerVar("Car"); $PlayerTime = GetCurrentPlayerVar("AccelerationTime"); FOR ($j=0; $j<=$maxCars;$j=$j+1) IF ( ToNum(IndexOf($accelData[$j], $PlayerCar)) >= 0 ) THEN # globalMsg ("DEBUG: accelData = " . $accelData[$j]); $aData = SplitToArray( $accelData[$j],"," ); dumpVar($aData); # Do the following FOR loop in reverse (counting down), so that the buttons only get created once FOR ( $i=$maxAccelerationTimes; $i >= 1; $i=$i-1) IF( ToNum($PlayerTime) > ToNum( $aData[$i]) ) THEN openPrivButton( "adjective",153,46,44,8,6,6,32,langEngine( "%{main_adjective" . $i ."}%", $NickName ) ); openPrivButton( "acceleration",153,60,44,5,4,5,16,langEngine("%{main_acceleration" . $i ."}%", $PlayerCar, GetCurrentPlayerVar("AccelerationEndSpeed"), GetCurrentPlayerVar("UnitSpeed"),$PlayerTime)); BREAK; # Break the FOR loop ENDIF ENDFOR BREAK; # Break the FOREACH loop ENDIF ENDFOR EndEvent # ACCELERATION MESSAGES Lang "EN" main_acceleration1 = "^3How did you get your ^6{0} ^3to reach%nl%^60 ^3to ^6{1} ^3{2} in ^6{3} ^3seconds?"; main_acceleration2 = "^3Great getting your ^6{0} ^3to reach%nl%^60 ^3to ^6{1} ^3 {2} in ^6{3} ^3seconds!"; main_acceleration3 = "^3Only got your ^6{0} ^3to reach%nl%^60 ^3to ^6{1} ^3 {2} in ^6{3} ^3seconds"; main_acceleration4 = "^3Not good only getting your ^6{0} ^3to reach%nl%^60 ^3to ^6{1} ^3 {2} in ^6{3} ^3seconds"; main_acceleration5 = "^3Only getting your ^6{0} ^3to reach%nl%^60 ^3to ^6{1} ^3 {2} in ^6{3} ^3seconds"; main_acceleration6 = "^3You drive a ^6{0}^3. ^3How did you only manage to reach%nl%^60 ^3to ^6{1} ^3 {2} in ^6{3} ^3seconds?"; main_adjective1 = "^7A M A Z I N G" . "%nl%{0}"; main_adjective2 = "^7I N C R E D I B L E" . "%nl%{0}"; main_adjective3 = "^7A V E R A G E" . "%nl%{0}"; main_adjective4 = "^7P A T H E T I C" . "%nl%{0}"; main_adjective5 = "^7P I T I F U L" . "%nl%{0}"; main_adjective6 = "^7D I S M A L" . "%nl%{0}"; EndLang