HG-Gearbox Developer guide
Note
All of the events are client side
Getters
GetSelectedGear - Returns the currently seleted gear
GetSelectedGearType - Get the type of the currently selected gear.
-- Returns: string: "manual" / "auto" / "manualmoto" / "automoto"
exports['hg-gearbox']:GetSelectedGearType()
GetNumberOfGears - Get the total number of gears in the current gearbox.
GetSportModeStatus - Check if the sport mode is activated.
GetClutchStatus - Check the status of the clutch.
GetUserSettings - Get user-specific gearbox settings.
Example of a returned object:{
manual = {
alwaysShown = true,
enableShake = true,
showRPM = config.showRPM,
scale = 1,
knob = { alt= "Default", src= "./assets/knobs/knobM.png"},
posx = -1,
posy = -1,
},
auto = {
alwaysShown = true,
scale = 1,
posx = -1,
posy = -1,
},
moto = {
scale = 1,
posx = -1,
posy = -1,
manualMode = true,
},
misc = {
enableSound = true,
opacity = 1,
volume = 0.2,
manualMode = config.defaultgearboxtype,
},
theme = "default",
}
Setters
GearboxSystemStatus(status) - Activate/Deactivate the gearbox system.
-
true
: The gearbox system is activatedfalse
: The gearbox system is deactivated (Goes back to normal GTA behaviour)
RefreshGearbox() - Refresh the gearbox system.
ForceGearboxMod(val) - Force a specific gearbox mode: "auto" / "manual" or deactivate with false.