Car HUD
INSTALLATION GUIDE
Step 0 - First Steps
1. Download your resource from FiveM's Keymaster.
2. Unzip the cd_carhud.zip folder and place this folder in your server's resource folder.
3. Add the resource to your server start config (server.cfg): ensure cd_carhud. If you are using a framework, it must be placed anywhere below your framework resource e.g., es_extended, not above.
ensure es_extended
ensure cd_carhudStep 1 - Configure Resource
You MUST read all configurable options inside the [cd_carhud/configs/config.lua] file and configure them to suit your server's needs. Please read the commented out help text at the end of each line so you can understand what each config option does.
The most important sections are the options under the Frameworkand Importantsections at the top of the config.lua. Everything else is optional.
Introducing our new 'auto_detect' feature! It automatically identifies your framework and applies the appropriate default settings.
Step 2 - Configure Key Binds
Before starting this resource on your main/live server, we highly advise configuring your key binds because this resource uses Fivem's Key Mapping.
Where can I configure my key binds?
You can configure key binds in the Keys and Commands section near the bottom of the [cd_carhud/configs/config.lua].
Why do I need to do this?
Well long story short;- once a player has joined your server with this resource running you can no longer force change their key binds for this resource through the config.lua, only they can change it in the in-game pause menu settings. Although it will change for the players who join after you have changed it.
The benefit of this system is that it's much more optimised and players can easily change their key binds on keyboards or controllers. You can also check out the Default Keybinds for this resource.
Step 4 - Fuel Script
Configure Config.FuelScript in the config.lua.
If you don't use any of the 3 pre-configured fuel scripts, you will need set Config.FuelScript to 'other' and add your code to get a vehicles fuel level from your fuel script into the GetFuel function in configs/client_customise_me.lua.
function GetFuel(vehicle)
if Config.FuelScript == 'none' then
return GetVehicleFuelLevel(vehicle) --Default FiveM native example.
elseif Config.FuelScript == 'legacyfuel' then
return DecorGetFloat(vehicle, '_FUEL_LEVEL') --Legacy Fuel example.
elseif Config.FuelScript == 'frfuel' then
return math.ceil((100 / GetVehicleHandlingFloat(vehicle, "CHandlingData", "fPetrolTankVolume")) * math.ceil(GetVehicleFuelLevel(vehicle))) --FRFuel example.
elseif Config.FuelScript == 'other' then
--Add your own code here to get a vehicles fuel.
end
end
INFORMATION
Default Keybinds
These keys can be modified and/or disabled in the Keys and Commands section of the [configs/config.lua].
Please make sure you understand how Key Mapping works.
| Key | Description |
|---|---|
Y | Open the settings UI. |
B | Toggle the seatbelt. |
= | Toggle cruise control. |
Chat Commands
These chat commands can be renamed and/or disabled in the Keys and Commands section of the [configs/config.lua].
The exact usage for each command will be displayed in the chat suggestions when using the commands in-game.
| Command | Description |
|---|---|
/carhud | Open the settings UI. |
/seatbelt | Toggle the seatbelt. |
/carhudtoggle | Toggle the car hud UI visibility. |
Events
These events are completely optional; you can use them if needed.
FAQ
Can I change the default UI settings?
Yes, you can; this can be done from configs/ui_config.js. After editing the default settings, you must click the Default Values button on the UI to apply the default values.
Optimization?
The balance between performance and optimization is something that you need to decide. You can't have the resource performing at its peak by updating the UI every frame without affecting the optimization. A middle ground is set by default so you can get the best of both worlds with little compromise.
- Seat belt (0.03ms) - By default, the thread for the seat belt in
client/functions.luaconsumes the majority of the ms. You can disable the seatbelt completely by settingConfig.Seatbelt.ENABLEto false. - CarHUD UI (0.02ms) - The default refresh rate value is 500ms. But you can set this default value for all players at the bottom of the
configs/ui_config.js. By default, the UI with all elements and settings enabled will use 0.02ms during use. Each player can also modify this value; lowering it will make the UI more responsive at the cost of increased resource usage.
Will the settings save after I relog?
Yes, the settings will save after you relog and after a server restart.
How do I use the indicators/turn signals?
The car HUD itself does not include this, but you can use an existing resource that uses these FiveM natives such as this.
COMMON ISSUES
Please check out our Troubleshooting Guide before contacting our support.
Folder Name Make sure the name of the folder is cd_carhud.
Encrypted Files Do not edit the encrypted files in any way.
ERROR CODES
If you see an error code not listed below, please open a script support ticket in the Codesign Discord.
CHANGELOG
Files Changed
Not every update requires replacing the entire folder. To avoid redoing your configs, use the option that applies
| Key | Meaning |
|---|---|
| Full Re-Download Required | Delete the old folder and replace it with the latest version. Reuse your config.lua unless told otherwise. |
| Update Specific Files | Only the files listed below need to be replaced. |
| Config Update Required | Your config.lua must be updated for this version. |
| Requires Auto SQL Enabled | Enable Config.AutoInsertSQL in config.lua to apply required database updates. |
Skipping Updates
If you’ve skipped previous updates, it’s recommended to update all files to avoid issues.
For example, if you're on v4.0.1, skipped v4.0.2, and are updating to v4.0.3, use the Full Download option.