Advanced Gearbox System [STANDALONE]

Description

Our script provides a significant enhancement to the in-game shifting experience. We’ve introduced three gearbox options: Manual, Auto, and Moto, and have made the user interface customizable. You can manipulate the gearboxes using your mouse or buttons, with a plethora of configuration options to tailor them to your preferences. It’s all about elevating your gaming experience to the next level. All of this in a STANDALONE package

Features

Settings Panel

The settings panel enables players to fine-tune their gearboxes to their liking. We’ve designed an easy-to-use and intuitive user interface that allows you to adjust settings like position, size, and style for each gearbox. These screenshots display each tab within the panel:

Furthermore, we offer support for 12 languages that you can select from, and you even have the option to add your own language. You can also customize all the colors and knobs shown in the Appearance tab.

Gearbox Types

Manual Gearbox

This option allows players to manually shift gears, giving them full control over their vehicle and creating a more realistic and challenging driving experience.

Control Methods
You can operate this gearbox using one of three different methods:

  1. Mouse
    • After pressing the clutch button, a mouse cursor will appear directly above the gear knob, allowing you to move it into the desired gear.
  2. Buttons
    • After pressing the clutch (which can be disabled in the configuration), you simply click the assigned number for the gear you want, and the gear knob will shift to that position.
  3. Sequential Buttons
    • After pressing the clutch (again, this can be disabled in the configuration), you can click either the “Shift Up” or “Shift Down” button to select the next or previous gear respectively, causing the gear knob to move accordingly.

You can choose which of these three methods you want to allow in the config (You can pick more than 1).

Themes Preview
Note: Gearbox themes and knobs can be customized individually.

Automatic Gearbox

This gearbox is designed for more casual players who prefer a simpler driving experience.

Control Method
This gearbox is exclusively controlled using the mouse. After pressing the action button, you can move the gear knob to one of the “PRNDS” positions.

Themes Preview

Motorcycle Gearbox

This gearbox is tailored for motorcycles.

Control Methods

  1. Sequential
    • After pressing the clutch (which can be disabled in the configuration), you can either click the “Shift Up” or “Shift Down” button to shift up or down a gear.
  2. Automatic Mode
    • More casual players can have the game shift gears automatically for them.

Themes Preview

Gameplay & Physics

We’ve implemented some features that make the script more realistic, including:

  • Engine revving without acceleration when the clutch is pressed or when in Neutral.
  • Automatic rolling when the vehicle is in gear and the clutch is released.
  • The vehicle stalls if you attempt to launch it in a high gear (applicable to Manual and Moto).
  • When in reverse, you press the acceleration button to move instead of using the default brake button. Please note that most of these settings can be toggled in the configuration.

Config

If you want a detailed explanation of all the options, along a customization/translation tutorial, check out the documentation for this script.

config                            = {}

-------------------------
---- General settings ---
-------------------------

config.Language = "en" -- "ar" "de" "en" "es" "fi" "fr" "is" "it" "pt-br" "ot" "sw" "vn" -- panel language

config.invertcontrolinreverse = true -- Invert the control of the W and S keys when in Reverse. This setting applies to all the gearboxes (manual, automatic, motorcycle).
config.clutchbutton = "LSHIFT" --[[ SHIFT ]] -- Define the button for toggling the clutch. This setting applies to all the gearboxes, player can change it from settings.
config.enableanimation = true -- Enable the gear change animation.
config.gearsettingscommand = 'gearmenu' -- Define the command to open the gear settings menu.
config.Mysql = "oxmysql" -- "mysql-async" , "ghmattimysql" , "oxmysql"
config.MysqlTableName = "hg-gearbox" -- ⚠️ Only change if you understand the implications.
config.defaultgearboxtype = false -- Set the default gearbox type (true for manual, false for automatic).
config.switchgeartype = true -- Allow players to switch between gearbox types from the settings panel.
config.showRPM = true -- show rpm default value for manual mode
config.EngineKill = true -- Kill the engine when putting the vehicle in gear and starting to roll in high gear for a realistic experience.

--- [[ BLACKLIST SYSTEM ]] ---
config.blacklistedvehicleclasses = {
    -- blacklisted vehicle classes that function normally with no gearbox system
    -- https://docs.fivem.net/natives/?_0x29439776AAA00A62
    13, -- Cycles
    14, -- Boats
    15, -- Helicopters
    16, -- Planes
    21  -- Trains
}
config.blacklistedvehicles = {
     -- Define blacklisted vehicles that function normally without a gearbox system
    "faggio", -- scooter
    "faggio2",  -- scooter
    "faggio3" -- scooter
}

--- [[ WHITELIST SYSTEM ]] ---
config.whitelistedvehicleclasses = {
    -- whitelisted vehicle classes that function with gearbox system, the rest will function with gta system 
    -- https://docs.fivem.net/natives/?_0x29439776AAA00A62
    -- 6, -- Sports  
}
config.whitelistedvehicles = {
     -- Define whitelisted vehicles that function with gearbox system, the rest will function with gta system 
    -- "sultanrs",
}
-- ⚠️ WARNING: whitelist will override blacklist system, example: if you blacklist a vehicle and whitelist it at same time for some reason, it will work with gearbox system.

config.allvehiclesAreManualExcept = {
   -- Specify vehicles that are forced to be automatic (Overrides config.defaultgearboxtype and config.switchgeartype)
   status = false,
   -- Add vehicles under this comment
   --'nero'
}
config.allvehiclesAreAutoExcept = {
    -- Specify vehicles that are forced to be manual (Overrides config.defaultgearboxtype and config.switchgeartype)
    status = false,
    -- Add vehicles under this comment
    --'sultanrs',
}
-- ⚠️ WARNING: Do not enable both 'config.allVehiclesAreManualExcept' and 'config.allVehiclesAreAutoExcept' simultaneously, the script will break.
config.forcemotorcycle = {
    -- Define vehicles you want to force motorcycle gearbox for
    status = false,
   -- Add vehicles under this comment
    --'policeb',
}



-------------------------
---- Manual settings ----
-------------------------

config.enableCarAutoRollOnDrive = true -- Allow the vehicle to start rolling slowly in 1st gear after releasing the clutch.
config.enginebrake = true -- Enable engine braking when downshifting for a more realistic experience. (This will apply to motorcycles as well)
-- Choose the method for manual gear changes.
config.Tranmissionmod = true -- if the car's transmission is modded in the mechanic this will add an additional gear in the box
config.manualgearchangemethods = "both"  --('both', 'numpad', 'pageupdown', 'none').

-- Define numpad buttons for gear changes. Users can change these settings later from the GTA settings.
config.clutchbuttons = true -- If true, the clutch needs to be pressed to change gears using this method.
config.changegearN = "NUMPAD0"
config.changegear1 = "NUMPAD1"
config.changegear2 = "NUMPAD2"
config.changegear3 = "NUMPAD3"
config.changegear4 = "NUMPAD4"
config.changegear5 = "NUMPAD5"
config.changegear6 = "NUMPAD6"
config.changegear7 = "NUMPAD7"
config.changegearR = "NUMPAD9"

-- Define buttons for sequential gear changes. Users can change these settings later from the GTA settings.
config.clutchbuttons2 = true -- If true, the clutch needs to be pressed to change gears using this method.
config.changegearup = "pageup"
config.changegeardown = "pagedown"




-----------------------
---- Auto settings ----
-----------------------

config.enableCarAutoRollOnDriveAuto = true -- Allow the vehicle to start rolling in drive/sport mode.
config.EnableSportMode = true -- Enable/disable sport mode (this will overide all the next settings if set to false)
config.SportModeEnabledForAllVehicles = false -- recommended off (imagine a truck with sport mode xD)
config.SportModeEnabledOnlyForTheseClasses = {
    -- Enable Sport mode for all vehicles of these classes
    status = true, -- recommended on
    -- vehicle classes https://docs.fivem.net/natives/?_0x29439776AAA00A62
    6, -- Sports
    7 -- Super
}
config.SportModeEnabledOnlyForTheseVehicles = {
    -- Enable Sport mode only for these vehicles
    status = false,
    -- Add vehicles under this comment
    't20',
    'nero',
}   

-- Set drive force, top speed, and brake force multiplier in sport mode.
config.sportmodeDriveForce = 1.5 -- Recommended values: 1.0 - 2.0     -- anything higher than that is crazy
config.sportmodeTopSpeed = 1.5 -- Recommended values: 1.0 - 2.0  in MPH     -- anything higher than that is crazy
config.sportmodeBrakeForce = 1.5 -- Recommended values: 1.0 - 2.0     -- anything higher than that is crazy




-----------------------
---- Moto settings ----
-----------------------


config.EnableMotorcycleGearBox = true -- Enable or disable the gearbox for motorcycles.
config.isclutchrequired = true -- Specify if clutch is required to change motorcycle gears.
config.enableMotoAutoRollOnDrive = true  -- Allow the motorcycle to start rolling slowly in 1st gear after releasing the clutch.
config.enablegearmodeswitch = true -- Allow players to switch between manual and automatic modes on motorcycles.

-- Define numpad buttons for motorcycle gear changes.
config.motogearupbutton = "ADD" -- + numpad button (can be changed by player in gta settings)
config.motogeardownbutton = "SUBTRACT" -- - numpad button (can be changed by player in gta settings)




----------------------- 
---- Notif settings ---
-----------------------


config.EnableNotifications = false
config.Debug = false -- debug mode in client console
config.Framework = "esx" -- "esx" || "qb" || "custom"
-- Note: framework check is only used for notications
config.Notification = function(message, type) -- You can change here events for notifications
    if config.EnableNotifications then
        if config.Framework == "esx" then
            TriggerEvent("esx:showNotification", message)
        elseif config.Framework == "qb" then
            TriggerEvent('QBCore:Notify', message, type, 1500)
        elseif config.Framework == "custom" then
            -- put your notification event here
            -- or use gta default
            SetNotificationTextEntry("STRING")
            AddTextComponentString(message)
            DrawNotification(false, false)
        end
    end
end
-- translation
config.txt1 = "Option disabled"
config.txt2 = "This is for vehicles not for motorcycles"
config.txt3 = "Gearbox type is forced by server owner"
config.txt4 = "Press clutch"

Exports

We provide client side exports that allow you to interact with the system programatically.

Getters

exports['hg-gearbox']:GetSelectedGear() -- Returns: int
exports['hg-gearbox']:GetSelectedGearType() -- Returns: string
exports['hg-gearbox']:GetNumberOfGears() -- Returns: int
exports['hg-gearbox']:GetSportModeStatus() -- Returns: boolean
exports['hg-gearbox']:GetClutchStatus() -- Returns: boolean
exports['hg-gearbox']:GetUserSettings() -- Returns: object

Setters

exports['hg-gearbox']:GearboxSystemStatus(status) -- status: boolean
exports['hg-gearbox']:RefreshGearbox()-- Refresh the gearbox system.
exports['hg-gearbox']:ForceGearboxMod(val) --val: string/false



Preview: Video

Timestamps:

Showcase 00:00
Settings Panel 04:03
Gameplay & Physics 10:28
Control Methods 14:51

Buy-here: Tebex




Also Check

Code is accessible No
Subscription-based No
Lines (approximately) 5k+
Requirements SQL
Support Yes
8 Likes

This release is awesome great work! :fire: :slight_smile:

1 Like

Gear Ratios and trhis is gold.

2 Likes

Thanks you so much! Our team is really proud of this release.

1 Like

We do actually have gear ratios but they’re hardcoded in the client script, if you want a version with the ratios in the config, contact our support and we’ll set that up for you. We’ll also add this in the next update for everyone. Thanks for the feedback!

1 Like

Price has been adjusted:

$35 $25 :white_check_mark:

1 Like

Cool release, just wanted to ask about modifying the colors and the knobs, are those files accessible?

1 Like

Thank you!
Yes, the colors are customizable, you’ll find a theme.css file in the ui/ folder, you can redefine the colors to whatever you want. As for the knobs, you can replace them in the ui/assets folder you just have to keep the same name(s). We recommend keeping the same resolution and as the existing ones, as it may cause some issues.
We’re also planning on publishing documentation for all of our scripts, so stay tuned for that. And if you need anything, just contact us, we’ll assist you!

1 Like

Ok I see, thank you I’ll think about it.

Hello, fantastic release and this script holds fantastic potential! I wanted to reach out to see if you had plans to make it so you can have it as an option to use the script full stop, or maybe have it activated, but it will just be normal in regards of the transmission.

As our server like the idea of the script, however there are some who wouldn’t have any plans to use the script in anyway and dont want to have to worry about gear changes etc.

1 Like

Glad you like the script! :heart: :heart:

We actually thought about doing that, we ultimately decided not to because we thought that the automatic gearbox is simple enough for normal players to use. And from playing around with it during the development and testing phase, it really is.
The knob snaps into place so you don’t have to think about it much when you’re moving it, and the cursor is actually placed on the knob when you’re about to shift. Plus, they have the option to make it hide when it’s not in use, so it’s out of the way.
And for the motorcycle gearbox, it does work exactly how you want it, because when it’s in “Automatic” mode, the UI just follows whatever the game does.

If you’re still not convinced, contact us on Discord, we’ll see what we can do.

Good stuff :fire: :fire: :fire: :fire: I was just wondering if this will interfere with other interfaces, for example our phone is at the bottom right, if someone has it up and needs to change gear, how does that work?

1 Like

Hello and thank you! Yes this may occur in certain scenarios, but fear not because any player can move each gearbox to any position they want, so if they feel like it’s blocking something, they can just move it out of the way!

1 Like

alright, thank you, i just wanna make sure of something, does the position gets saved or i have to change it everytime ?

1 Like

Yes, the position is saved when you close the menu.

1 Like

Hey everyone, Developer here.

We’re excited to announce the launch of our brand new Documentation website, where you can find comprehensive installation and configuration guide for this gearbox system and our other scripts.

Check it out HERE

2 Likes

Update!

We added client side exports! Now you can interact with the script from other scripts.
You can read the developer guide on our documentation website

2 Likes

Hey all, developer here.

Gearbox System Update

  • Added config.forcemotorcycle option in the config. Read more in the docs.
  • Fixed an issue where the cursor doesn’t dissappear when a player exists vehicle while the clutch is engaged.
  • Fixed an issue where player cant accelerate while clutch pressed ( now you can accelerate while in gear & clutch pressed)
  • Fixed an issue where the gearbox doesn’t hide when a player opens the pause menu.
  • Fixed an issue where the gear change cursor doesn’t hide when the gearbox system is forced to OFF using exports[‘hg-gearbox’]:GearboxSystemStatus(false)

Please update your assets. If you encounter any issues with the current built, please contact us.

Enjoy!

1 Like

Greetings,

Gearbox System update

  • Fixed an issue where opening the pause menu while the settings panel is open doesn’t hide it.
  • Fixed an issue where blacklisted motorcycles would play the gear animation/sound when the gear shifting buttons are pressed.
  • Fixed an issue where multi-character scripts on QBCore cause a crash.
  • Increased performance while the script is idle.
    Please update your assets. If you encounter any issues with the current built, please contact us.

Enjoy!

1 Like

I can’t enter your DC

1 Like