Skip to content
This repository was archived by the owner on Sep 23, 2026. It is now read-only.
Dking07Public archive

Latest commit

 

History

62 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

GEARBOX SWITCH [STANDALONE]

Thumbnail

DESCRIPTION

Bring authentic manual and sequential transmission dynamics to your FiveM server with the Gearbox Switch System. Engineered for both standalone servers and economic roleplay environments, this script introduces 100% manual shifting control, realistic clutch engagement, ignition cutting, rev-matching (punta-tacco), custom interior animations, and immersive 3D audio.

NOTE: Requires GTA V GameBuild 3095 or higher and vehicle handlings configured with CCarHandlingData in SubHandlingData to take full effect.

Featuring custom addon sound effects (.awc) attached directly to vehicle entities, responsive clutch physics that disengage power and realistically decelerate the vehicle, dynamic left/right-hand drive shifting animations, and full inventory item integration for mechanics, this resource delivers an unparalleled driving experience.

KEY FEATURES

Realistic Transmission & Clutch Mechanics

  • 100% Manual Shifting: Completely eliminates unwanted automatic gear shifting when active — every gear upshift and downshift is commanded by the driver.
  • Sequential & H-Pattern Support: Seamless shifting experience supporting both sequential transmissions (ideal for sports/race cars) and manual gearboxes.
  • Clutch Engagement & Deceleration: Holding the clutch down disengages the drivetrain, allowing realistic RPM coasting and natural vehicle deceleration.
  • Ignition Cut & Rev-Matching: Integrated ignition cutting during fast shifts and automated rev-matching (Punta-Tacco / Heel-and-Toe) on downshifts.
  • Reverse Gear Calibration: Smooth, realistic reverse gear acceleration and gear validation avoiding drivetrain lockups.

Dual Operating Architecture

  • Standalone Mode ('ALONE'): Plug-and-play operation with KVP persistence (global or vehicle-specific), ox_lib keybinds/commands, and zero database requirements.
  • Roleplay Mode ('RP'): Physical item installation by mechanics, OneSync StateBag synchronization (hasManualGearbox), raycast vehicle detection, and framework compatibility.

Dynamic Shifting Animations

  • Custom Shifting Animations: Custom ped animations for gear shifting (dking@anim@gear) for both upshifts and downshifts.
  • Right-Hand Drive (RHD) Support: Automatic detection and manual fallback for RHD vehicles with dedicated left-hand shifting animations.
  • Transmission-Specific Animations: Distinct animation styles for sequential shift levers vs. traditional manual shifters.

High-Fidelity 3D Positional Audio

  • Custom Addon Audio: Built with custom wavepacks (dking02gearbox.awc and dking02gearbox_sounds.dat) loaded natively into GTA V audio banks.
  • Entity-Attached Sounds: High-fidelity sound effects for every gear change, clutch engagement, and sequential shift lever click originating directly from the vehicle.

Vehicle Compatibility & Control

  • Customizable Blacklist: Easily exclude specific vehicle models or classes from gearbox mechanics.
  • Sequential Vehicle List: Define specific performance cars to automatically operate with sequential transmission characteristics.

GET NOW

HOW TO INSTALL

  1. Download the script;
  2. Place the dking_gearbox folder in your server's resources directory;
  3. Ensure you have ox_lib installed and started;
  4. Add ensure dking_gearbox to your server.cfg.

Note for RP Mode: If running Config.Mode = 'RP', ensure entity state bag synchronization is enabled and configure your inventory or mechanic scripts to trigger UseInstallItem or InstallVehicleGearbox.

HOW TO USE

Standalone Mode (Config.Mode = 'ALONE')

  • /gearbox (or F10 key) - Toggle manual gearbox mode on or off.
  • LMENU (Left Alt) - Press and hold clutch pedal.
  • LSHIFT (Left Shift) - Shift gear up (requires clutch if clutch is enabled, unless vehicle is in sequential mode).
  • LCONTROL (Left Ctrl) - Shift gear down (requires clutch if clutch is enabled, unless vehicle is in sequential mode).
  • All keybinds can be reconfigured in config/commands.lua or individually by players in Settings > Key Bindings > FiveM.

Roleplay Mode (Config.Mode = 'RP')

  1. Mechanics approach the vehicle with the gearbox module item in their inventory;
  2. Use the item (UseInstallItem export) or execute the installation export in front of the vehicle;
  3. Once installed, the vehicle entity receives the replicated StateBag (hasManualGearbox = true);
  4. The driver can then toggle and utilize manual shifting in that vehicle.

HANDLING SETUP

To allow the script to take full effect on your custom vehicles, ensure their handling.meta contains CCarHandlingData inside <SubHandlingData>:

<SubHandlingData>
  <Item type="CCarHandlingData">
  </Item>
  <Item type="NULL" />
  <Item type="NULL" />
</SubHandlingData>

EXPORTS

Expand Exports API

Client Exports

Export Description Return
exports['dking_gearbox']:SetGearboxState(enabled) Enables or disables manual gearbox on current vehicle boolean
exports['dking_gearbox']:GetGearboxState() Gets current gearbox active state boolean
exports['dking_gearbox']:ToggleGearboxState() Toggles manual gearbox state on current vehicle boolean
exports['dking_gearbox']:GetGearboxFullState() Returns complete runtime state snapshot table
exports['dking_gearbox']:HasVehicleGearbox([veh]) Checks if vehicle has manual gearbox module installed boolean
exports['dking_gearbox']:UseInstallItem(data, slot) Usable item handler for inventory systems (e.g. ox_inventory) boolean

Server Exports

Export Description Return
exports['dking_gearbox']:SetPlayerGearboxState(playerId, enabled) Enables or disables gearbox for specific player by server ID boolean
exports['dking_gearbox']:InstallVehicleGearbox(vehicleNetId) Installs manual gearbox hardware on vehicle entity (StateBag) boolean, string
exports['dking_gearbox']:RemoveVehicleGearbox(vehicleNetId) Removes manual gearbox hardware from vehicle entity boolean, string
exports['dking_gearbox']:HasVehicleGearbox(vehicleNetId) Checks if vehicle entity has hardware module installed boolean

CONFIGURATION

The resource provides modular configuration files split across config/:

  • config/config.lua: Master settings (Config.Mode, Config.KVPSave, Config.ActiveClutch, Config.SoundEffects, and Config.Blacklist).
  • config/commands.lua: Command names, descriptions, ACE permissions, and keybind mappings (gearbox, clutch, gearup, geardown).
  • config/animation_config.lua: Shifting animation durations, sequential cars list (SequentialCars), RHD cars list (RHDCars), and animation dictionary mappings.
  • config/notifys.lua: Notification configurations and styling for ox_lib notifications.
  • locales/: Multi-language dictionary files (en.lua, pt-br.lua).

PREVIEW

DEPENDENCIES

  • GameBuild 3095 or higher
  • ox_lib

SUPPORT

CHANGELOGS

Expand Changelogs

1.1

  • Added blacklist of vehicle models that will not be affected by the script.

1.2

  • Added gear shift animation.

1.3

  • Added manual and sequential shift sound effects;
  • Added sequential gear shift animation;
  • Added new right hand gear shift animation;
  • Added exports for:
  • Exports
    • Toggles the manual gearbox on/off;
    • Enables the manual gearbox;
    • Disables the manual gearbox;
    • Checks if the manual gearbox is currently enabled;
    • Gets the current gear of the vehicle;
    • Manually triggers the gear shift animation.

1.3.2

  • Fixed animation names.

1.3.3

  • Various improvements;
  • Changed the logic for shifting gears;
  • Changed the binds for shifting gears;
  • Clutch system added;
  • Changes to exports.

1.3.5

  • Fixed animations not working.

1.3.6

  • Changed all sound effects logic.

1.3.7

  • Completely removed any automatic shifting when the gearbox is activated, now 100% of gear changes are done manually;
  • Added ignition cut and rev match (Punta-Tacco) systems;
  • Added clutch engagement system, now if you keep the clutch pressed while moving, the car starts to slow down;
  • Added a few more improvements and fixes;
  • Updated exports.

1.3.8

  • Added dual operating mode (Config.Mode) supporting Standalone (ALONE) and Roleplay (RP);
  • Added vehicle hardware gating via OneSync entity state bags (hasManualGearbox) in RP mode;
  • Added item-based gearbox installation support with vehicle raycast detection;
  • Added new server and client exports for vehicle transmission management.

COPYRIGHT

BY DKING 2026 ©