Configuration
Configure orbit-dynamichud-addons keybinds, seatbelt behavior, cruise control, and notifications.
Configuration
All public configuration lives in resources/[orbit]/orbit-dynamichud-addons/config.lua.
This resource is client-heavy. Most settings affect how the local player toggles seatbelt or cruise control, what DynamicHUD receives through state bags, and when GTA's windscreen ejection behavior is allowed.
Prop
Type
Config.Seatbelt = {
enable = true,
keybind = 'B',
useMPH = false,
minSpeedUnbuckled = 20.0,
minSpeedBuckled = 160.0,
harness = {
disableFlyingThroughWindscreen = true,
minSpeed = 200.0
}
}useMPH changes how minSpeedUnbuckled, minSpeedBuckled, and harness speed values are interpreted. Set it to true only when you want those thresholds written as miles per hour.
harness.disableFlyingThroughWindscreen = true prevents windscreen ejection while a harness is active. If you set it to false, harness.minSpeed becomes the ejection threshold while harnessed.
Config.Cruise = {
enable = true,
keybind = 'Y'
}Cruise can only enable when the player is driving, the vehicle is moving forward, and the vehicle class is supported by the client script.
Config.Notify = function(message, type)
TriggerEvent("orbit-dynamichud:notify", {
description = message,
type = type or 'info',
duration = 3000
})
endReplace this function if you do not use DynamicHUD notifications. Keep it client-side and keep the (message, type) parameters so the seatbelt and cruise scripts can call it normally.
Locales
The addon uses ox_lib locales. Set the locale in server.cfg, then edit the matching JSON file if you want different labels or messages.
setr ox:locale en{
"actions": {
"toggle_cruise_control": "Toggle Cruise Control"
},
"success": {
"cruise_control_enabled": "Cruise control enabled"
},
"error": {
"cruise_control_disabled": "Cruise control disabled",
"cruise_control_unavailable": "Cruise control is not available for this vehicle"
},
"seatbelt_desc": "Toggle Seatbelt"
}