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.
1. Unzip the
cd_carhud.zipfolder and place this folder in your server's resource folder.
2. Add the resource to your server start config:
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.
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.
Config.FuelScriptin the config.lua.
If you don't use any of the 3 pre-configured fuel scripts, you will need set
Config.FuelScriptto 'other' and add your code to get a vehicles fuel level from your fuel script into the
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.
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.
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 Valuesbutton on the UI to apply the default values.
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.luaconsumes the majority of the ms. It can be reduced by 0.02ms by disabling
Config.DisableExitingVehicle. You can disable the seatbelt completely by setting
- 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.
Yes, the settings will save after you relog and after a server restart.
🔔 Folder Name Make sure the name of the folder is
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 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_carhudfolder, 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.