This guide explains how to correctly install and configure C7 Lux HUD on your FiveM server. Follow each step carefully to ensure the framework loads and functions as intended.
01. Installing the Resource
1
Download the latest release of the C7 Lux HUD;
This folder should contain the folder: c7-scripts-lux-hud
Altering the script to your preferred configuration has been made easy with our configuration file. To get started, you need to open the file: c7-scripts-lux-hud/shared/config.lua
1
Configuring the Framework Type
To change the framework type of the script, you need to change the following configuration lines:
2
Configuring the Basics
You must change the following lines:
3
Configuring Area of Play & Priority
You must change the following lines:
By default, /aop and /prio commands can be accessed by anyone. You must change the configuration file if you wish to limit who can use these commands.
4
Configuring the Vehicle Controls Module
You must change the following lines:
5
Configuring the Seatbelt Module
You must change the following lines:
6
Configuring the Cruise Control Module
You must change the following lines:
7
Configuring the Sounds
You can upload your own custom sounds if you wish. They must be .ogg files and placed in /html/assets/[your_file].ogg
Change the following configuration lines to alter sounds:
8
Configuring the Fuel System
You must change the following lines:
Set 'Enabled' to 'false' and 'useExternal' to 'true' to disable the fuel system completely.
05. In-Game Commands
/hudsettings - This will open the UI to alter your HUD's appearance to your own style.
/hud - This will hide every element on the screen except the minimap.
Press 'E' on your keyboard to refuel your vehicle, you must be close to a pump and outside of your vehicle.
Config.FrameworkMode = 'Standalone' -- Standalone / C7FW
Config.C7FrameworkResource = 'c7-scripts-framework-v3' -- Only if FrameworkMode is 'C7FW'
Config.DefaultSpeedUnit = 'MPH' -- Units: 'MPH' or 'KPH'
Config.NearestPostal = {
enabled = true,
resource = "nearest-postal",
exportName = "getPostal"
}
Config.Notifications = {
Enabled = true,
Notifications = {
seatbelt = true, -- Toggles a notification when your seatbelt is put on/off.
cruiseControl = true, -- Toggles a notification when you enable cruise control on/off.
engine = true, -- Toggles a notification when your engine is turned on/off.
}
}
Config.Priority = {
Enabled = true, -- Should priority be enabled?
CooldownMinutes = 20, -- Default cooldown when /prioend
Permissions = { -- Who should be able to access priority commands? Leave empty for everyone.
licenses = {}, -- FiveM license identifiers, e.g. { "license:1234abcd..." }
discordIds = {}, -- Discord user IDs (WITHOUT the "discord:" prefix), e.g. { "123456789012345678" }
acePerms = {}, -- Ace permissions, e.g. { "c7.doorlock" }
c7fw = {
departments = {}, -- Departments to allow, e.g. { "LSPD", "BCSO" }
characterIds = {}, -- Character IDs to allow, e.g. { "RX-153471" }
}
},
CanSeePriority = { -- What players/departments can see the priority display? Leave empty for everyone.
licenses = {},
discordIds = {},
acePerms = {},
c7fw = {
departments = {},
characterIds = {},
}
}
}
Config.AOP = {
Enabled = true, -- Should AOP be enabled?
Default = 'Sandy Shores',
Permissions = { -- Who should be able to access /aop? Leave empty for everyone.
licenses = {},
discordIds = {},
acePerms = {},
c7fw = {
departments = {},
characterIds = {},
}
}
}
Config.VehicleControls = {
Enabled = true,
Controls = {
hood = { enabled = true, command = "/hood" }, -- Opens/Closes the Vehicle Hood.
trunk = { enabled = true, command = "/trunk" }, -- Opens/Closes the Vehicle Trunk.
engine = { enabled = true, command = "/engine", alias = "/eng" }, -- Turns your Vehicle Engine ON/OFF.
front_left_window = { enabled = true, command = "/window1" }, -- Rolls the Driver's Window Down/Up
front_right_window = { enabled = true, command = "/window2" }, -- Rolls the Passengers's Window Down/Up
rear_left_window = { enabled = true, command = "/window3" }, -- Rolls the Back Rear Left's Window Down/Up
rear_right_window = { enabled = true, command = "/window4" }, -- Rolls the Back Rear Rights's Window Down/Up
front_left_door = { enabled = true, command = "/door1" }, -- Opens/Closes the Drivers Side Door
front_right_door = { enabled = true, command = "/door2" }, -- Opens/Closes the Passengers Door
back_left_door = { enabled = true, command = "/door3" }, -- Opens/Closes the Back Rear Left Door
back_right_door = { enabled = true, command = "/door4" }, -- Opens/Closes the Back Rear Right Door
open_all_doors = { enabled = true, command = "/alldoors" }, -- Opens/Closes all Vehicle Doors (includes trunk and hood)
}
}
Config.Seatbelt = {
Enabled = true, -- Disables the full seatbelt module
Key = 'B',
PreventExit = true,
Sounds = {
Enabled = true, -- Enable/Disable seatbelt sounds
On = { File = 'assets/seatbelt_on.ogg', Volume = 0.25 },
Off = { File = 'assets/seatbelt_off.ogg', Volume = 0.25 },
Chime = {
Enabled = true, -- Enable/Disable the seatbelt chime
File = 'assets/seatbelt_chime.ogg',
Volume = 0.20,
SpeedThreshold = 40.0, -- Speed at which the chime starts if seatbelt is OFF (in the unit configured above).
}
},
Ejection = {
Enabled = true, -- Enable/Disable seatbelt ejection
-- If seatbelt is OFF:
MinSpeedMPH = 20, -- Below this speed, never eject
DecelThresholdMPH = 18, -- Sudden speed drop needed to trigger an eject check
EjectChance = 0.40, -- Chance to eject when conditions hit (0.0 - 1.0)
DamageOnEject = 200, -- Damage applied if not instantly fatal
-- Fatality scaling
FatalSpeedMPH = 80, -- At/above this speed, chance of instant death increases
FatalChance = 0.35, -- Chance of instant death when above FatalSpeedMPH
-- If seatbelt is ON: still possible at extreme speeds
BeltOverrideSpeedMPH = 200, -- Above this, belt may fail (very rare)
BeltOverrideChance = 0.03, -- Chance to eject even with belt on above override speed
TickMs = 50, -- Crash detection tick (Don't change unless you know what you're doing)
}
}
Config.CruiseControl = {
Enabled = true,
MinSpeedMPH = 3, -- Won't enable cruise below this speed
BreakOnBrake = true, -- Disable cruise when braking
BreakOnAccelerate = false, -- Disable cruise when accelerating
TickMs = 50, -- How often we enforce the speed (Don't change unless you know what you're doing)
}
Config.Seatbelt = {
Sounds = {
Enabled = true, -- Enable/Disable seatbelt sounds
On = { File = 'assets/seatbelt_on.ogg', Volume = 0.25 },
Off = { File = 'assets/seatbelt_off.ogg', Volume = 0.25 },
Chime = {
Enabled = true, -- Enable/Disable the seatbelt chime
File = 'assets/seatbelt_chime.ogg',
Volume = 0.20,
SpeedThreshold = 40.0, -- Speed at which the chime starts if seatbelt is OFF (in the unit configured above).
}
}
Config.IndicatorSound = {
Enabled = true,
Volume = 0.40, -- 0.0 - 1.0
File = 'assets/indicator_click.ogg',
}
Config.Fuel = {
Enabled = true, -- If true, fuel will be managed by this HUD. If false, this will disable fuel completely.
useExternal = false, -- If true, use an external fuel resource and hide the fuel icon completely.
-- Refuel interaction
Key = 38, -- E (INPUT_CONTEXT)
StationRange = 4.0, -- How close you must be to a pump/station
PumpRange = 1.8, -- How close you must be to the actual pump nozzle (tighter than StationRange)
VehicleRange = 2.5, -- How close you must be to your vehicle to refuel
RequireEngineOff = true, -- To refuel the vehicle, should the engine be off?
RequireOutsideVehicle = true, -- To refuel the vehicle, should the player be outside the vehicle?
-- Refuel visuals
-- Defaults use a jerry can style pour animation + prop (no more leaf blower nonsense).
-- You can change these if you prefer a different style.
RefuelPropModel = `w_am_jerrycan`,
RefuelAnimDict = "weapon@w_sp_jerrycan",
RefuelAnimName = "fire",
-- Rates are in "fuel percent per second" where 100 = full tank.
RefuelRate = 2.0, -- % per second while holding E (feels snappy)
ConsumptionEnabled = true,
Consumption = {
BasePerSecond = 0.02, -- idle + low speed drain
SpeedFactor = 0.00035, -- extra drain per MPH (or KPH, minor difference)
},
-- UI thresholds
LowThreshold = 35.0, -- <35% -> flashing red icon
MidThreshold = 50.0, -- 35-50% -> orange icon, >50 -> green
-- Fuel icon display
-- 1 = Filled icon (classic): changes to green/orange/flash red
-- 2 = Percentage filled icon: coloured fill shows actual fuel % over grey base
IconMode = 2,
-- Drivability
CriticalThreshold = 2.0, -- <=2% -> misfire / sluggish
CriticalTorqueMultiplier = 0.55,
CriticalJerkChance = 0.16, -- chance each second to "cough" power briefly
CriticalJerkDurationMs = 180,
EmptyThreshold = 0.2, -- <=0.2% -> engine cuts out
PreventRestartWhenEmpty = true,
-- Pump object models to detect as "gas stations"
PumpModels = {
`prop_gas_pump_1a`,
`prop_gas_pump_1b`,
`prop_gas_pump_1c`,
`prop_gas_pump_1d`,
`prop_gas_pump_old2`,
`prop_gas_pump_old3`,
},
}