Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Tuning System by Seby for Vice City Multiplayer. (0.4)
- ===================================================================================================================================================================
- CREDITS:
- Scripter: Seby (aka sseebbyy)
- Special credits goes to Stormeus for hydraulics !
- DO NOT REMOVE THEM, OR WE WILL NEVER OFFER YOU HELP OR SCRIPTS AGAIN !
- ===================================================================================================================================================================
- Description:
- This system let you customize and personalize your ride, making it better looking. 8)
- It sends the car in an unique garage, and shows the menu.
- (without the Custom Menu System, you cannot make this script work)
- */
- tuneMenuID <- 0;
- tuneSecondMenuID <- tuneMenuID + 1;
- TUNE_CAMERA_LOOK <- Vector( -1045.39, -477.155, 10.9386 );
- TUNE_CAMERA_TOP <- Vector( -1041.19, -470.739, 13.145 );
- TUNE_CAMERA_TOP_FRONT <- Vector( -1038.92, -476.014, 13.7027 );
- TUNE_CAMERA_TOP_REAR <- Vector( -1053.45, -478.343, 13.859 );
- TUNE_CAMERA_FRONT <- Vector( -1038.7, -476.018, 10.9283 );
- TUNE_CAMERA_REAR <- Vector( -1053.2, -478.082, 10.9283 );
- TUNE_CAMERA_SIDE <- Vector( -1047.44, -482.952, 10.9876 );
- TUNE_WORLD <- 1000;
- tuneColorPrefix <- "[#FFC23D]";
- tuneColorText <- "[#E6E6E6]";
- tuneColorError <- "[#FF0000]";
- tuneColorEnabled <- "[#9CFF5E]";
- tuneColorDisabled <- "[#5E64FF]";
- TUNE_LIMIT_ACCELERATION <- 55;
- TUNE_LIMIT_MAXSPEED <- 300;
- TUNE_LIMIT_TRACTION <- 1;
- tuneHydraulicsVariant <- array( GetMaxPlayers(), null );
- tuneHydraulicsEnabled <- array( 1000, 0 );
- tuneSavedPos <- array( GetMaxPlayers(), null );
- tuneSavedAngle <- array( GetMaxPlayers(), null );
- //==================== KEYS ==============================
- // NUMPADs
- TUNE_HYDRAULICS_LEFT <- BindKey( true, 0x64, 0, 0 );
- TUNE_HYDRAULICS_RIGHT <- BindKey( true, 0x66, 0, 0 );
- TUNE_HYDRAULICS_UP <- BindKey( true, 0x68, 0, 0 );
- TUNE_HYDRAULICS_DOWN <- BindKey( true, 0x62, 0, 0 );
- // for keyboards without NUMPADs
- // U (up), J (down), H (left), K (right)
- TUNE_HYDRAULICS_LEFT2 <- BindKey( true, 0x48, 0, 0 );
- TUNE_HYDRAULICS_RIGHT2 <- BindKey( true, 0x4B, 0, 0 );
- TUNE_HYDRAULICS_UP2 <- BindKey( true, 0x55, 0, 0 );
- TUNE_HYDRAULICS_DOWN2 <- BindKey( true, 0x4A, 0, 0 );
- //========================================================
- print( "Tuning System by Seby was successfully loaded !" );
- function tuneCreateMenu( )
- {
- CreateMenu( "Tuning System", "Colour 1", "Colour 2", "Front & Rear Bumpers", "Performance", "Suspension", "Custom Lights", "Trunk & Hood", "Hydraulics", "Firetruk's Handling", "Deluxo's Handling" );
- menu[ tuneMenuID ].AddSubmenu( 1, "/Colour 1", "Black", "White", "Grey", "Red", "Green", "Blue", "Yellow", "Pink", "Next Colour", "Previous Colour" );
- menu[ tuneMenuID ].AddSubmenu( 2, "/Colour 2", "Black", "White", "Grey", "Red", "Green", "Blue", "Yellow", "Pink", "Next Colour", "Previous Colour" );
- menu[ tuneMenuID ].AddSubmenu( 3, "/Front & Rear Bumpers", "Front Bumper", "Rear Bumper" );
- menu[ tuneMenuID ].AddSubmenu( 4, "/Performance", "Increase Acceleration", "Increase MaxSpeed", "Upgrade Traction", "Upgrade Brakes", "Drive on Water" );
- menu[ tuneMenuID ].AddSubmenu( 5, "/Suspension", "Increase Height", "Decrease Height", "High", "Medium", "Low", "Lowest", "Bias - Increase", "Bias - Decrease" );
- menu[ tuneMenuID ].AddSubmenu( 6, "/Custom Lights", "Both - Remove Boxes", "Both - Next type", "Both - Previous type", "Front - Green", "Front - Orange", "Rear - Green", "Rear - Red", "Rear - Orange", "Front - Default", "Rear - Default" );
- menu[ tuneMenuID ].AddSubmenu( 7, "/Trunk & Hood", "Trunk", "Hood" );
- }
- function tuneCreateSecondMenu( )
- {
- CreateMenu( "Tuning System", "Colour 1", "Colour 2", "Custom Lights", "Performance" );
- menu[ tuneSecondMenuID ].AddSubmenu( 1, "/Colour 1", "Black", "White", "Grey", "Red", "Green", "Blue", "Yellow", "Pink", "Next Colour", "Previous Colour" );
- menu[ tuneSecondMenuID ].AddSubmenu( 2, "/Colour 2", "Black", "White", "Grey", "Red", "Green", "Blue", "Yellow", "Pink", "Next Colour", "Previous Colour" );
- menu[ tuneSecondMenuID ].AddSubmenu( 3, "/Custom Lights", "Both - Remove Boxes", "Both - Next type", "Both - Previous type", "Front - Green", "Front - Orange", "Rear - Green", "Rear - Red", "Rear - Orange", "Front - Default", "Rear - Default" );
- menu[ tuneSecondMenuID ].AddSubmenu( 4, "/Performance", "Increase Acceleration", "Increase MaxSpeed", "Upgrade Traction", "Upgrade Brakes", "Drive on Water" );
- }
- function tuneJoin( player )
- {
- tuneSavedPos[ player.ID ] = 0;
- tuneSavedAngle[ player.ID ] = 0;
- tuneHydraulicsVariant[ player.ID ] = 0;
- }
- function tuneKeyDown( player, key )
- {
- switch( key )
- {
- case TUNE_HYDRAULICS_LEFT:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 0 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( 0.0, 0.035, 0.0 ) );
- return;
- }
- case TUNE_HYDRAULICS_LEFT2:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 1 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( 0.0, 0.035, 0.0 ) );
- return;
- }
- case TUNE_HYDRAULICS_RIGHT:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 0 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( 0.0, -0.035, 0.0 ) );
- return;
- }
- case TUNE_HYDRAULICS_RIGHT2:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 1 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( 0.0, -0.035, 0.0 ) );
- return;
- }
- case TUNE_HYDRAULICS_DOWN:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 0 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( 0.06, 0.0, 0.0 ) );
- return;
- }
- case TUNE_HYDRAULICS_DOWN2:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 1 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( 0.06, 0.0, 0.0 ) );
- return;
- }
- case TUNE_HYDRAULICS_UP:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 0 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( -0.06, 0.0, 0.0 ) );
- return;
- }
- case TUNE_HYDRAULICS_UP2:
- {
- if( player.Vehicle && VehType( player.Vehicle.Model ) == "Car" && tuneHydraulicsVariant[ player.ID ] == 1 && tuneHydraulicsEnabled[ player.Vehicle.ID ] == 1 )
- player.Vehicle.AddRelTurnSpeed( Vector( -0.06, 0.0, 0.0 ) );
- return;
- }
- default: break;
- }
- }
- function tuneExitMenu( player )
- {
- local veh = player.Vehicle;
- if( !veh ) return;
- else
- {
- player.World = 0;
- veh.World = player.World;
- player.Vehicle = veh;
- player.RestoreCamera();
- veh.Pos = tuneSavedPos[ player.ID ];
- veh.EulerAngle = tuneSavedAngle[ player.ID ];
- }
- }
- function tuneEnterSubmenu( player, menuID, submenuID )
- {
- switch( menuID )
- {
- case tuneMenuID: // first menu
- switch( submenuID )
- {
- case 4:
- player.SetCameraPos( TUNE_CAMERA_TOP_FRONT, TUNE_CAMERA_LOOK );
- break;
- case 5:
- player.SetCameraPos( TUNE_CAMERA_SIDE, TUNE_CAMERA_LOOK );
- break;
- default: break;
- }
- break;
- case tuneSecondMenuID: // second menu
- switch( submenuID )
- {
- case 3:
- if( VehType( player.Vehicle.Model ) != "Car" && VehType( player.Vehicle.Model ) != "Bike" )
- {
- menu[ tuneSecondMenuID ].HideSubmenu( player, submenuID );
- ::MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorError + " [ Error ] " + tuneColorText + "This option is only for cars and bikes !", player );
- }
- break;
- case 4:
- tuneEnterSubmenu( player, tuneMenuID, 4 );
- break;
- }
- break;
- default: break;
- }
- }
- function tuneSwitchOptionsInSubmenu( player, menuID, submenuID, oldOption, newOption )
- {
- switch( menuID )
- {
- case tuneMenuID:
- switch( submenuID )
- {
- case 3: // Front & Rear Bumpers
- switch( newOption )
- {
- case 1:
- player.SetCameraPos( TUNE_CAMERA_FRONT, TUNE_CAMERA_LOOK );
- break;
- case 2:
- player.SetCameraPos( TUNE_CAMERA_REAR, TUNE_CAMERA_LOOK );
- break;
- default: break;
- }
- break;
- case 6: // Custom Lights
- switch( newOption )
- {
- case 1:
- case 2:
- case 3:
- player.SetCameraPos( TUNE_CAMERA_TOP, TUNE_CAMERA_LOOK );
- break;
- case 4:
- case 5:
- case 8:
- player.SetCameraPos( TUNE_CAMERA_TOP_FRONT, TUNE_CAMERA_LOOK );
- break;
- case 6:
- case 7:
- case 9:
- case 10:
- player.SetCameraPos( TUNE_CAMERA_REAR, TUNE_CAMERA_LOOK );
- break;
- default: break;
- }
- break;
- case 7: // Trunk & Hood
- switch( newOption )
- {
- case 1:
- player.SetCameraPos( TUNE_CAMERA_TOP_REAR, TUNE_CAMERA_LOOK );
- break;
- case 2:
- player.SetCameraPos( TUNE_CAMERA_TOP_FRONT, TUNE_CAMERA_LOOK );
- break;
- default: break;
- }
- break;
- default: break;
- }
- break;
- case tuneSecondMenuID:
- switch( submenuID )
- {
- case 3:
- tuneSwitchOptionsInSubmenu( player, tuneMenuID, 6, oldOption, newOption );
- break;
- default: break;
- }
- break;
- default: break;
- }
- }
- function tuneSelectInMenu( player, menuID, option )
- {
- switch( option )
- {
- case 8: // Hydraulics
- if( tuneHydraulicsEnabled[ player.Vehicle.ID ] == 0 )
- {
- tuneHydraulicsEnabled[ player.Vehicle.ID ] = 1;
- if( tuneHydraulicsVariant[ player.ID ] == 0 ) MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Hydraulics were " + tuneColorEnabled + "enabled" + tuneColorText + " ! Use " + tuneColorEnabled + "NUMPADs 8, 2, 4, 6" + tuneColorText + " !", player );
- else MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Hydraulics were " + tuneColorEnabled + "enabled" + tuneColorText + " ! " + tuneColorEnabled + "Use U, J, H, K" + tuneColorText + " !", player );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " If you don't enjoy the combination, use " + tuneColorEnabled + "/hydraulicskeys" + tuneColorText + " to change it !", player );
- }
- else
- {
- tuneHydraulicsEnabled[ player.Vehicle.ID ] = 0;
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Hydraulics were " + tuneColorDisabled + "disabled" + tuneColorText + " !", player );
- }
- break;
- case 9: // Firetruk's Handling
- player.Vehicle.SetHandlingData( 1, 6500 );
- player.Vehicle.SetHandlingData( 2, 2.9 );
- player.Vehicle.SetHandlingData( 3, 7.7 );
- player.Vehicle.SetHandlingData( 4, 3.8 );
- player.Vehicle.SetHandlingData( 5, 0 );
- player.Vehicle.SetHandlingData( 6, 0 );
- player.Vehicle.SetHandlingData( 7, 0 );
- player.Vehicle.SetHandlingData( 8, 90 );
- player.Vehicle.SetHandlingData( 9, 0.65 );
- player.Vehicle.SetHandlingData( 10, 0.7 );
- player.Vehicle.SetHandlingData( 11, 0.5 );
- player.Vehicle.SetHandlingData( 12, 5 );
- player.Vehicle.SetHandlingData( 13, 170 );
- player.Vehicle.SetHandlingData( 14, 22 );
- player.Vehicle.SetHandlingData( 15, 82 );
- player.Vehicle.SetHandlingData( 16, 68 );
- player.Vehicle.SetHandlingData( 17, 10 );
- player.Vehicle.SetHandlingData( 18, 0.45 );
- player.Vehicle.SetHandlingData( 19, 27 );
- player.Vehicle.SetHandlingData( 20, 1.2 );
- player.Vehicle.SetHandlingData( 21, 0.08 );
- player.Vehicle.SetHandlingData( 22, 0.2 );
- player.Vehicle.SetHandlingData( 23, 0.26 );
- player.Vehicle.SetHandlingData( 24, 0.47 );
- player.Vehicle.SetHandlingData( 25, -0.17 );
- player.Vehicle.SetHandlingData( 26, 0.5 );
- player.Vehicle.SetHandlingData( 27, 0 );
- player.Vehicle.SetHandlingData( 28, 17412 );
- player.Vehicle.SetHandlingData( 29, 0 );
- player.Vehicle.SetHandlingData( 30, 1 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Firetruk's Handling " + tuneColorEnabled + "applied" + tuneColorText + " to your car !", player );
- break;
- case 10: // Deluxo's Handling
- player.Vehicle.SetHandlingData( 1, 1600 );
- player.Vehicle.SetHandlingData( 2, 2.2 );
- player.Vehicle.SetHandlingData( 3, 4.9 );
- player.Vehicle.SetHandlingData( 4, 1.7 );
- player.Vehicle.SetHandlingData( 5, 0 );
- player.Vehicle.SetHandlingData( 6, 0 );
- player.Vehicle.SetHandlingData( 7, 0.2 );
- player.Vehicle.SetHandlingData( 8, 75 );
- player.Vehicle.SetHandlingData( 9, 0.8 );
- player.Vehicle.SetHandlingData( 10, 0.85 );
- player.Vehicle.SetHandlingData( 11, 0.52 );
- player.Vehicle.SetHandlingData( 12, 5 );
- player.Vehicle.SetHandlingData( 13, 200 );
- player.Vehicle.SetHandlingData( 14, 26 );
- player.Vehicle.SetHandlingData( 15, 52 );
- player.Vehicle.SetHandlingData( 16, 80 );
- player.Vehicle.SetHandlingData( 17, 10 );
- player.Vehicle.SetHandlingData( 18, 0.53 );
- player.Vehicle.SetHandlingData( 19, 30 );
- player.Vehicle.SetHandlingData( 20, 2.25 );
- player.Vehicle.SetHandlingData( 21, 0.16 );
- player.Vehicle.SetHandlingData( 22, 0.28 );
- player.Vehicle.SetHandlingData( 23, 0.52 );
- player.Vehicle.SetHandlingData( 24, 0.27 );
- player.Vehicle.SetHandlingData( 25, -0.16 );
- player.Vehicle.SetHandlingData( 26, 0.5 );
- player.Vehicle.SetHandlingData( 27, 0.35 );
- player.Vehicle.SetHandlingData( 28, 33154 );
- player.Vehicle.SetHandlingData( 29, 0 );
- player.Vehicle.SetHandlingData( 30, 1 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Deluxo's Handling " + tuneColorEnabled + "applied" + tuneColorText + " to your car !", player);
- break;
- default: break;
- }
- }
- function tuneSelectInSubmenu( player, menuID, submenuID, option )
- {
- switch( menuID )
- {
- case tuneMenuID:
- switch( submenuID )
- {
- case 1:
- switch ( option )
- {
- case 1:
- player.Vehicle.Colour1 = 0;
- break;
- case 2:
- player.Vehicle.Colour1 = 1;
- break;
- case 3:
- player.Vehicle.Colour1 = 66;
- break;
- case 4:
- player.Vehicle.Colour1 = 14;
- break;
- case 5:
- player.Vehicle.Colour1 = 46;
- break;
- case 6:
- player.Vehicle.Colour1 = 50;
- break;
- case 7:
- player.Vehicle.Colour1 = 6;
- break;
- case 8:
- player.Vehicle.Colour1 = 5;
- break;
- case 9:
- if( player.Vehicle.Colour1 == 94 ) player.Vehicle.Colour1 = 0;
- else player.Vehicle.Colour1 += 1;
- break;
- default:
- if( player.Vehicle.Colour1 == 0 ) player.Vehicle.Colour1 = 94;
- else player.Vehicle.Colour1 -= 1;
- break;
- }
- break;
- case 2:
- switch ( option )
- {
- case 1:
- player.Vehicle.Colour2 = 0;
- break;
- case 2:
- player.Vehicle.Colour2 = 1;
- break;
- case 3:
- player.Vehicle.Colour2 = 66;
- break;
- case 4:
- player.Vehicle.Colour2 = 14;
- break;
- case 5:
- player.Vehicle.Colour2 = 46;
- break;
- case 6:
- player.Vehicle.Colour2 = 50;
- break;
- case 7:
- player.Vehicle.Colour2 = 6;
- break;
- case 8:
- player.Vehicle.Colour2 = 5;
- break;
- case 9:
- if( player.Vehicle.Colour2 == 94 ) player.Vehicle.Colour2 = 0;
- else player.Vehicle.Colour2 += 1;
- break;
- default:
- if( player.Vehicle.Colour2 == 0 ) player.Vehicle.Colour2 = 94;
- else player.Vehicle.Colour2 -= 1;
- break;
- }
- break;
- case 3:
- switch( option )
- {
- case 1:
- if( player.Vehicle.GetPart( 0 ) != 0 )
- {
- player.Vehicle.SetPart( 0, 0 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Front Bumper was " + tuneColorEnabled + "re-added" + tuneColorText + " !", player);
- }
- else
- {
- player.Vehicle.SetPart( 0, 3 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Front Bumper was " + tuneColorDisabled + "removed" + tuneColorText + " !", player);
- }
- break;
- default:
- if( player.Vehicle.GetPart( 1 ) != 0 )
- {
- player.Vehicle.SetPart( 1, 0 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Rear Bumper was " + tuneColorEnabled + "re-added" + tuneColorText + " !", player);
- }
- else
- {
- player.Vehicle.SetPart( 1, 3 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Rear Bumper was " + tuneColorDisabled + "removed" + tuneColorText + " !", player);
- }
- break;
- }
- break;
- case 4:
- switch( option )
- {
- case 1:
- if( player.Vehicle.GetHandlingData( 14 ) < TUNE_LIMIT_ACCELERATION )
- {
- player.Vehicle.SetHandlingData( 14, player.Vehicle.GetHandlingData( 14 ) + 5 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Acceleration " + tuneColorEnabled + "increased" + tuneColorText + " ! (new: " + player.Vehicle.GetHandlingData( 14 ) + ")", player);
- }
- else MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorError + " [ Error ] " + tuneColorText + "The acceleration touched the limit !", player );
- break;
- case 2:
- if( player.Vehicle.GetHandlingData( 13 ) < TUNE_LIMIT_MAXSPEED )
- {
- player.Vehicle.SetHandlingData( 13, player.Vehicle.GetHandlingData( 13 ) + 5 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Max Speed " + tuneColorEnabled + "increased" + tuneColorText + " !", player);
- }
- else MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorError + " [ Error ] " + tuneColorText + "The engine fails in increasing the max speed ! (new: " + player.Vehicle.GetHandlingData( 13 ) + ")", player );
- break;
- case 3:
- player.Vehicle.SetHandlingData( 9, player.Vehicle.GetHandlingData( 9 ) * 1.4 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Traction was " + tuneColorEnabled + "upgraded" + tuneColorText + " ! (new: " + player.Vehicle.GetHandlingData( 9 ) + ")", player);
- break;
- case 4:
- player.Vehicle.SetHandlingData( 17, player.Vehicle.GetHandlingData( 17 ) * 1.4 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Brakes were " + tuneColorEnabled + "upgraded" + tuneColorText + " ! (new: " + player.Vehicle.GetHandlingData( 17 ) + ")", player);
- break;
- case 5:
- if( player.Vehicle.GetHandlingData( 33 ) == 0 )
- {
- player.Vehicle.SetHandlingData( 33, 1 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Drive on Water was " + tuneColorEnabled + "enabled" + tuneColorText + " !", player);
- }
- else
- {
- player.Vehicle.SetHandlingData( 33, 0.0 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Drive on Water was " + tuneColorDisabled + "disabled" + tuneColorText + " !", player);
- }
- break;
- default: break;
- }
- break;
- case 5:
- switch(option)
- {
- case 1:
- if( player.Vehicle.GetHandlingData( 24 ) > -0.1 )
- {
- player.Vehicle.SetHandlingData( 24, player.Vehicle.GetHandlingData( 24 ) - 0.1 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Car's suspension became " + tuneColorEnabled + "higher" + tuneColorText + " !", player );
- }
- else MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorError + " [ Error ] " + tuneColorText + "Suspension touched the limit !", player );
- break;
- case 2:
- player.Vehicle.SetHandlingData( 24, player.Vehicle.GetHandlingData( 24 ) + 0.1 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Car's suspension became " + tuneColorDisabled + "lower" + tuneColorText + " !", player );
- break;
- case 3:
- player.Vehicle.SetHandlingData(24, 0 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Car's suspension was set to " + tuneColorEnabled + "High Level" + tuneColorText + " !", player );
- break;
- case 4:
- player.Vehicle.SetHandlingData(24, 0.5 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Car's suspension was set to " + tuneColorEnabled + "Medium Level" + tuneColorText + " !", player );
- break;
- case 5:
- player.Vehicle.SetHandlingData(24, 1.0 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Car's suspension was set to " + tuneColorEnabled + "Low Level" + tuneColorText + " !", player );
- break;
- case 6:
- player.Vehicle.SetHandlingData(24, 1.2);
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Car's suspension was set to " + tuneColorEnabled + "Lowest Level" + tuneColorText + " !", player );
- break;
- case 7:
- player.Vehicle.SetHandlingData( 26, player.Vehicle.GetHandlingData( 26 ) - 0.05 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " The bias suspension was " + tuneColorEnabled + "increased" + tuneColorText + " !", player );
- break;
- case 8:
- player.Vehicle.SetHandlingData( 26, player.Vehicle.GetHandlingData( 26 ) + 0.05 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " The bias suspension was " + tuneColorDisabled + "decreased" + tuneColorText + " !", player );
- break;
- default: break;
- }
- break;
- case 6:
- switch(option)
- {
- case 1:
- player.Vehicle.SetHandlingData( 29, 20 );
- player.Vehicle.SetHandlingData( 30, 20 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Lights' boxes were " + tuneColorDisabled + "disabled" + tuneColorText + " !", player );
- break;
- case 2:
- player.Vehicle.SetHandlingData( 29, player.Vehicle.GetHandlingData( 29 ) + 1 );
- player.Vehicle.SetHandlingData( 30, player.Vehicle.GetHandlingData( 30 ) + 1 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Both lights' boxes were changed to the next type !", player );
- break;
- case 3:
- player.Vehicle.SetHandlingData( 29, player.Vehicle.GetHandlingData( 29 ) - 1 );
- player.Vehicle.SetHandlingData( 30, player.Vehicle.GetHandlingData( 30 ) - 1 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Both lights' boxes were changed to the previous type !", player );
- break;
- case 4:
- player.Vehicle.SetHandlingData(29,-3);
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Front light was upgraded with a [#74FF24]green " + tuneColorText + " color !", player );
- break;
- case 5:
- player.Vehicle.SetHandlingData(29,-2);
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Front light was upgraded with an [#FF9924]orange " + tuneColorText + "color !", player );
- break;
- case 6:
- player.Vehicle.SetHandlingData(30,-7);
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Rear light was upgraded with a [#74FF24]green " + tuneColorText + " color !", player );
- break;
- case 7:
- player.Vehicle.SetHandlingData(30,-5);
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Rear light was upgraded with a [#FF0000]red " + tuneColorText + "color !", player );
- break;
- case 8:
- player.Vehicle.SetHandlingData(30,-6);
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Rear light was upgraded with an [#FF9924]orange " + tuneColorText + "color !", player );
- break;
- case 9:
- player.Vehicle.SetHandlingData( 29, player.Vehicle.GetHandlingData( 29 ) );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Front light was set to default !", player );
- break;
- case 10:
- player.Vehicle.SetHandlingData( 30, player.Vehicle.GetHandlingData( 30 ) );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Rear light was set to default !", player );
- break;
- default: break;
- }
- break;
- case 7:
- switch( option )
- {
- case 1:
- if( player.Vehicle.GetPart( 9 ) != 0 )
- {
- player.Vehicle.SetPart( 9, 0 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Trunk has been " + tuneColorEnabled + "re-added" + tuneColorText + " !", player );
- }
- else
- {
- player.Vehicle.SetPart( 9, 3 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Trunk has been " + tuneColorDisabled + "removed" + tuneColorText + " !", player );
- }
- break;
- default:
- if( player.Vehicle.GetPart( 8 ) != 0 )
- {
- player.Vehicle.SetPart( 8, 0 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Hood has been " + tuneColorEnabled + "re-added" + tuneColorText + " !", player );
- }
- else
- {
- player.Vehicle.SetPart( 8, 3 );
- MessagePlayer( tuneColorPrefix + "[ Tuning ]" + tuneColorText + " Hood has been " + tuneColorDisabled + "removed" + tuneColorText + " !", player );
- }
- break;
- }
- break;
- default: break;
- }
- break;
- case tuneSecondMenuID:
- switch( submenuID )
- {
- case 1:
- case 2:
- case 4:
- tuneSelectInSubmenu( player, tuneMenuID, submenuID, option );
- break;
- case 3:
- tuneSelectInSubmenu( player, tuneMenuID, 6, option );
- break;
- default: break;
- }
- break;
- default: break;
- }
- }
- function VehType( model ) {
- switch ( model ) {
- case 136:
- case 160:
- case 176:
- case 182:
- case 183:
- case 184:
- case 202:
- case 203:
- case 214:
- case 223:
- return "Boat";
- case 155:
- case 177:
- case 199:
- case 217:
- case 218:
- case 227:
- return "Heli";
- case 166:
- case 178:
- case 191:
- case 192:
- case 193:
- case 198:
- return "Bike";
- case 171:
- case 194:
- case 195:
- case 231:
- return "RC";
- case 190:
- return "Plane";
- default:
- return "Car";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement