Links

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.
Buy Here
This resource can be purchased as part of a bundle for a discount here & here.

Translate

START HERE

1. Unzip the cd_carhud.zip folder and place this folder in your server's resource folder.
2. Add the resource to your server start config: ensure cd_carhud.
3. WARNING The name of the folder must not be changed or the resource will not function correctly.
4. WARNING Do not edit the encrypted files in any way.

INSTALLATION GUIDE

Step 1 - Fxmanifest

You may need to make some changes to the fxmanifest.lua, depending on your framework and dependencies. We have made this easier for you by commenting on the lines which you may need to change.

Step 2 - Configure the resource

You MUST read all of the configurable options inside the config.lua 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 Framework and Important sections at the top of the config.lua. Everything else is optional.

Step 3 - Configure your keybinds

Before starting this resource on your main/live server we highly advise you to configure your key binds because this resource uses Fivem's Key Mapping.
Why? 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 own 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

Please Read Here for more information regarding key mapping.
Key
Description
Y
Open the settings UI.
B
Toggle the seatbelt.
=
Toggle cruise control.

Chat Commands

All of these chat commands can be renamed and disabled/enabled in the config/code.
If a command isn't working, make sure the config option for the said feature is enabled in the config.lua.
Command
Description
/carhud
Open the settings UI.
/seatbelt
Toggle the seatbelt.
/carhudtoggle
Toggle the carhud UI visibility.

FAQ

Can I change the default UI settings?

Yes you can, this can be done from configs/ui_config.js. After you have edited the default settings you will need to 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 simply can’t have the resource performing at its peak performance by updating the UI every frame without affecting the optimization. Although, the resource has been created in such a way where you can allow your players to decide whether they want peak performance from the UI at the cost of losing 1-2 fps or if they want to keep the fps at the cost of the UI being less responsive. But there is a middle ground which 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. It can be reduced by 0.02ms by disabling Config.DisableExitingVehicle. You can disable the seatbelt completely by setting Config.Seatbelt.ENABLE to false.
  • CarHUD UI (0.02ms) - The refresh rate of the UI can also play a huge factor in optimization. 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 by itself with all elements and settings enabled will use 0.02ms during use. Each individual player can also modify this value, lowering it will result in the UI being 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.

ERROR CODES

If you see an error code which isn't 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.

CHANGELOG

Files Changed: Not 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.
  • Specific Files - This means you can simply copy and paste the SPECIFIC new files over the old ones and restart the server.
Update Type: On 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.
v3.0.0
v4.0.0

26/12/2020 - 21/06/2021

v3.0.0 - v3.0.6
Files Changed:
  • All files
  • 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.

08/11/2021

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Authentication
  • We are now using the official Authentication System provided by FiveM. The old auth system will be taken offline 1 week from now (give or take a few days if needed).