HG-Gearbox Configuration Documentation
Config.lua
General Settings
Language Settings
Change the language to any of the provided locales
-
Provided Languages:
Value Language ar Arabic de German en English es Spanish fi Finnish fr French is Icelandic it Italian pt-br Brazilian Portuguese pt Portuguese sw Swedish vn Vietnamese
You can add a language or modify an existing one very easily. Simply navigate to the ui/assets/locale
directory:
.
βββ hg-gearbox/
βββ ui/
βββ assets/
βββ locale/
βββ en.json
βββ *.json
en.json
) and rename it to something else (ex: tr.json
for Turkish) And change the text.
Example:
Next, simply change the value to whatever you named the file
General controls
config.invertcontrolinreverse = true -- (1)!
config.clutchbutton = 21 -- (2)!
config.gearsettingscommand = 'gearmenu' --(3)!
- Invert the control of the ACCELERATE (W) and BRAKE (S) keys when in Reverse.
- This setting applies to all the gearboxes.
- The button for toggling the clutch.
- By Default: Shift
- This setting applies to all the gearboxes.
- Define the command to open the gear settings menu.
SQL Settings
- Available options:
- mysql-async
- ghattimysql
- oxmysql
- Change the SQL Table's name.
Warning
Only change the SQL Table's name if you understand the implications!
Gameplay Settings
config.enableanimation = true -- (1)!
config.defaultgearboxtype = false -- (2)!
config.switchgeartype = true --(3)!
config.showRPM = true -- (4)!
config.EngineKill = true -- (5)!
- Enable the gear changing animation.
-
Set the default gearbox type:
- If set to
true
, it will default to the Manual Gearbox - If set to
false
, it will default to the Automatic Gearbox
- If set to
-
Allow players to switch between gearbox types from the settings panel.
- Enable RPM meter next to manual gearbox by default.
- Kill the engine when putting the vehicle in high gear and starting to roll for a realistic experience.
Vehicle Blacklist/Whitelist
The vehicle classes set below will function normally without the gearbox system. You can find a list of the vehicle categories in the FiveM Docs
Vehicle models set below will function normally without a gearbox system.Specify vehicles that are forced to be automatic
Specify vehicles that are forced to be manual
Note
config.AllVehiclesAreManualExcept
and config.AllVehiclesAreAutoExcept
will override config.defaultgearboxtype
and config.switchgeartype
.
Warning
DO NOT enable 'config.allVehiclesAreManualExcept' and 'config.allVehiclesAreAutoExcept' simultaneously. The script will break.
Specify vehicles that are forced to use the motorcycle gearbox
Manual Gearbox Settings
Gameplay
config.enableCarAutoRollOnDrive = true -- (1)!
config.enginebrake = true -- (2)!
config.Tranmissionmod = true -- (3)!
config.manualgearchangemethods = "both" --(4)!
- Allow the vehicle to start rolling slowly in 1st gear after releasing the clutch.
- Enable engine braking when downshifting for a more realistic experience. (This will apply to motorcycles as well)
- When enabled, vehicles with a modified transmission (Not stock) will get an extra gear.
- Choose the allowed methods for changing gears.
- Allowed options:
- 'both'
- 'numpad'
- 'pageupdown'
- 'none'
- Allowed options:
Controls
Number Controls
config.clutchbuttons = true -- (1)!
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"
- If
true
, the clutch needs to be pressed to change gears using numbers.
Sequential Controls
config.clutchbuttons2 = true -- (1)!
config.changegearup = "pageup"
config.changegeardown = "pagedown"
- If
true
, the clutch needs to be pressed to change gears in sequential mode.
Note
Both Number and Sequential controls can be changed by the users from the GTA settings.
Automatic Gearbox Settings
Gameplay
- Allow the vehicle to start rolling in Drive/Sport gear.
Sport Mode
config.EnableSportMode = true -- (1)!
config.SportModeEnabledForAllVehicles = false --(2)!
config.SportModeEnabledOnlyForTheseClasses = {
status = true, -- (3)!
6, 7 -- (4)!
}
config.SportModeEnabledOnlyForTheseVehicles = {
status = false, -- (5)!
't20','nero' -- (6)!
}
config.sportmodeDriveForce = 1.5 --(7)!
config.sportmodeTopSpeed = 1.5 --(8)!
config.sportmodeBrakeForce = 1.5 --(9)!
- Enable/disable sport mode
- This will overide all the next settings if set to false.
- Enabled Sportmode for ALL vehicles
- Recommended off.
- This will override config.SportModeEnabledOnlyForTheseClasses & config.SportModeEnabledForTheseVehicles
- Enable Sport mode for the vehicle classes below.
- Vehicle classes can be found in the FiveM Documentation.
- Enable Sport mode only for these vehicles.
- Put the desired vehicles seperated by a comma
,
- Set drive force multiplier for sport mode. Recommended Values: 1.0-2.0
- Set top speed multiplier for sport mode. Recommended Values: 1.0-2.0
- Set brake force multiplier for sport mode. Recommended Values: 1.0-2.0
Motorcycle Gearbox Settings
Gameplay
config.EnableMotorcycleGearBox = true -- (1)!
config.isclutchrequired = true -- (2)!
config.enableMotoAutoRollOnDrive = true -- (3)!
config.enablegearmodeswitch = true -- (4)!
- Enable or disable the gearbox for motorcycles.
- Specify if clutch button must be pressed to change motorcycle gears.
- Allow the motorcycle to start rolling slowly in 1st gear after releasing the clutch.
- Allow players to switch between manual and automatic modes on motorcycles.
Controls
- Define Gear Up button for Motorcycles
- By Default: Numpad PLUS (Num +)
- Define Gear Up button for Motorcycles
- By Default: Numpad MINUS (Num -)
Note
Both Gear UP and Gear DOWN buttons can be changed from the GTA settings
Notification Settings
Options
config.EnableNotifications = false --(1)!
config.Debug = false -- (2)!
config.Framework = "custom" -- (3)!
config.Notification = function(message, type) -- (4)!
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 --(5)!
SetNotificationTextEntry("STRING")
AddTextComponentString(message)
DrawNotification(false, false)
end
end
end
- Enable alert notifications.
- Enable debugging mode in client console.
- Choose which framework's notification system to use.
- Available options
- esx
- qb
- custom
- Available options
- Here you can change the events for notifications.
-
- Define your own notification event here.
- By default, this uses GTA's notification system.
Customize text
config.txt1 = "Option disabled" --(1)!
config.txt2 = "This is for vehicles not for motorcycles" --(2)!
config.txt3 = "Gearbox type is forced by server owner" --(3)!
config.txt4 = "Press clutch" --(4)!
- Shows up when a player tries to change a disabled option.
- Shows up when a player tries to change between car Auto/Manual modes while on a motorcycle.
- Shows up when a player tries to change a forced gearbox type.
- Shows up when a player tries to change gears without pressing the clutch (When clutch is required).
UI Customization
Color scheme
You can customize the existing themes by changing the colors in the themes.css
file, found under ui/
.
If the provided themes.css
file isn't formatted, you can use an online CSS formatter to make it readable, or simply download the formatted themes.css below
Each of these variables roughly describes what each color represents. Results may differ between gearboxes.
m-01
, m-02
,m-03
and g-01
are for the panel
[data-theme=purple] {
--gearboxBackgroundColor: #5042ab;
--gateOutlineColor: #f3c150;
--gateBackgroundColor: #000000;
--horizontalGateBackgoundColor: #000000;
--gearIndicatorColor: #ffffff;
--reverseGearColor: #f3c150;
--redlineColor: #f3c150;
--m-01: #5042ab;
--m-02: #776ace;
--m-03: #c9c5f5;
--g-01: linear-gradient(95deg, var(--m-01), var(--m-02))
}
Note
You can't add more themes. You can only modify the existing ones.
Tip
To make sure the colors you use are visible, keep the same contrast as the default colors for each theme.
Customize Gearknobs
You can customize the gearknobs by changing the default pictures that come with the script. You can find the pictures under ui/assets/knobs
.
There, you'll find a collection of gearknobs. Here are the knobs which are used in the manual gearbox:
Gearknob | File name |
---|---|
Default | knobM.png |
Basketball | knobMBasketball.png |
Kuromi | knobMKuromi.png |
Skull | knobMSkull.png |
Finger | knobMSkullFinger.png |
8Ball | knobM8ball.png |
Biohazard | knobMBiohazard.png |
Arcade | knobMArcade.png |
You can download the provided Photoshop Document (Gearknob.psd
) where you'll find a template.
Info
If you're going to change the shape of one of the gearknobs, make sure to keep the same resolution/aspect ratio as the original ones. Also make sure that the base of the knob is in the same position.
Info
We don't recommend you change the shape Motorcycle's shifter, as it's very precisely placed to fit the shift light. You can make modifications to the existing one without
Note
You can't add more gearknobs, you have to replace the existing ones.
Change Panel Font
You can change the panel's font by adding font files (*.otf
/ *.ttf
/...) in the ui/assets/fonts
folder and defining a new font family named Custom
in the fonts.css
file. You need font weights 400
, 500
and 700
.
Example:
@font-face {
font-family: Custom;
src: url('../fonts/MyFont.ttf') format('truetype');
font-weight: 400;
}
Support
If you found anything unclear, or you have any questions, you can contact us on Discord by opening a ticket.