Car HUD
Step-by-step installation guide, common issues & solutions, code snippets, error codes, config previews, locales previews, SQL previews, and changelogs; all in 1 easily accessible place.
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:
ensure cd_carhud
. If you are using a framework, it must be placed anywhere below your framework resource e.g., es_extended, not above.
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.
Introducing our new 'auto_detect' feature! It automatically identifies your framework and applies the appropriate default settings.
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.
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
These keys can be modified and/or disabled in the Keys and Commands section of the
[configs/config.lua]
.Key | Description |
Y | Open the settings UI. |
B | Toggle the seatbelt. |
= | Toggle cruise control. |
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. |
These events are completely optional; you can use them if needed.
client-side to client-side
server-side to client-side
Open the settings UI
Open the settings UI.
TriggerEvent('cd_carhud:OpenSettingsUI')
Toggle the seatbelt
Toggle the seatbelt.
TriggerEvent('cd_carhud:ToggleSeatbelt')
Toggle cruise control
Toggle cruise control.
TriggerEvent('cd_carhud:ToggleCruise')
Toggle the car hud UI visibility
Toggle the car hud UI visibility.
TriggerEvent('cd_carhud:ToggleHud')
Open the settings UI
Open the settings UI.
TriggerClientEvent('cd_carhud:OpenSettingsUI', source)
Toggle the seatbelt
Toggle the seatbelt.
TriggerClientEvent('cd_carhud:ToggleSeatbelt', source)
Toggle cruise control
Toggle cruise control.
TriggerClientEvent('cd_carhud:ToggleCruise', source)
Toggle the car hud UI visibility
Toggle the car hud UI visibility.
TriggerClientEvent('cd_carhud:ToggleHud', source)
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.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.lua
consumes the majority of the ms. You can disable the seatbelt completely by settingConfig.Seatbelt.ENABLE
to 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.
Yes, the settings will save after you relog and after a server restart.
The car HUD itself does not include this, but you can use an existing resource that uses these FiveM natives such as this.
🔔 Folder Name Make sure the name of the folder is
cd_carhud.
🔔 Encrypted Files Do not edit the encrypted files in any way.
If you see an error code not listed below, please open a script support ticket in the Codesign Discord.
Server
Client
N/A
3216855 - The value of the Refresh Timer in the settings UI is nil, enter a number and it will be fixed.
88146545 - Either the Config.Language you have chosen does not have a matching set of locales in the Locales.lua or one of the locales in the Locales.lua is missing/has been renamed. Whatever you changed, revert it and try again.
30165847 - The format of the Notif function is wrong, what ever you have changed, revert the change and try again.
Files ChangedNot every update requires you to replace the whole folder. We do this because we understand it's a pain to redo the configs for every update.
- All Files - This means you should delete your old
cd_carhud
folder, download and add in the latest version, reconfigure the configs folder and restart your server. - All Files Except config.lua - This means you should do all of the above (in the All Files section) but additionally make a backup of the
config.lua
file and replace the new config.lua file with the one you made a backup of. - Specific Files - This means you can copy and paste the SPECIFIC new files over the old ones and restart the server.
Update TypeOn rare occasions, you are forced to update to the latest version. Mostly due to authentication updates where the old versions will no longer work.
- Mandatory - This means you MUST update to this new version, or the old versions will no longer work.
- Optional - This means it's completely your choice whether you wish to update to the latest version. But we do not offer support for old versions for obvious reasons; they are old.
Skipping Updates
If you are attempting to update to the latest version but have skipped previous updates, you should update all files just to be safe. For example., let's say you are currently on v4.0.1, you did not update when v4.0.2 was released, and now v4.0.3 is released, and you want to update; you should always use the “All Files” update method.
v3.0.0
v4.0.0
v4.0.1
v3.0.0 - v3.0.6
Files Changed:
- All Files
- All Files Except config.lua
- Specific Files
Update Type:
- Mandatory
- Optional
Changelog:
Add
- Added cruise control.
- Added a command to toggle the carhud visibility (also an option to hide the minimap visibility within this when the carhud visibility is disabled).
- Added compass
- Compass can be moved around / enabled disabled.
- Compass heading can be hidden / shown.
- Compass caret can be hidden / shown.
Edit
- Updated hud gauge to a transparent colour.
- Improved text visibility.
- Re-enabled indicator checks.
- Updated the codesign error handlers.
Fix
- Seatbelt sound fix.
- Dashboard icons scaling fix.
- Engine health alert fix.
- Fixed random server error on server start.
- Minor bug fixes.
- Fixed street names erroring when on the cayo perico island.
- Fixed the compass heading being inverted.
- Fixed the percentage character on the settings menu.
- Fixed it so other seatbelt scripts can trigger an event to enable/disable the seatbelt icon on the UI.
- Temporary fix for the canary issue until the new Tebex FiveM license system is ready to launch, when this is released we will be fully switching over to the new system.
Files Changed:
- All Files
- All Files Except config.lua
- Specific Files
Update Type:
- Mandatory
- Optional
Changelog:
Add
- Auto Framework Detection - We have added a new feature we are calling 'auto_detect', which will automatically identify your framework and apply the appropriate default settings.
- Added the option to display debug prints.
Fix
- Fixed the rpm not being 0 when the engine is off.
Last modified 2mo ago