Player HUD
INSTALLATION GUIDE
Step 0 - First Steps
1. Download your resource from FiveM's Keymaster.
2. Unzip the cd_playerhud.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_playerhud. 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_playerhudStep 1 - Fxmanifest
Depending on your framework and dependencies, you may need to make some changes inside the [cd_playerhud/fxmanifest.lua]. We have made this easier by commenting on the lines you possibly need to change.
Step 2 - Configure Resource
You MUST read all configurable options inside the [cd_playerhud/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.
Step 3 - SQL Database
You MUST import the SQL file to your database. This SQL file is located inside theREAD_ME_AFTER_PURCHASING folder; the file is named SQL_main.sql. Watch this video if you are unsure how to do this HeidiSQL / PHPMyAdmin.
Step 4 - 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_playerhud/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 - Basic Needs & Status
Create your own apps
Tips for creating Your own app screens
The position in the screens.list array determines the order of displaying the screens. Do not change screens.current unless you want a different screen to display first (screens.current goes from 0 to screens.list.length-1)
Currently, the screens.list.name value has no use; however, it is reserved for future use, such as setting options for certain apps. // The screens.list.id is the id of the element containing the app screen. It will be displayed once it is cycled.
To make your app functional you would either need to create another JavaScript file and include it through the HTML or add inline JavaScript to the index.html file itself.
To place the screen in the correct position, use the .app-screen class on your HTML element.
The existing apps are not editable; however, you can change their order if you wish.
INFORMATION
Default Key Binds
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 |
|---|---|
I | Toggle the watch UI. |
K | Toggle move mode. |
Right Click | Disable move mode. |
Left / Right Arrows | Cycle through the screens. |
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 |
|---|---|
/watchhud | Toggle the watch UI. |
/resetstatus | (Staff Only) Reset a player's hunger, thirst, stress, and oxygen stats. |
Events
These events are completely optional; you can use them if needed.Here is some information about this event.
Exports
These exports are completely optional; you can use them if needed.
Common Issues
Please check out our Troubleshooting Guide before contacting our support.
Folder Name Make sure the name of the folder is cd_playerhud.
Encrypted Files Do not edit the encrypted files in any way.
Money/Hunger etc is not being updated on the UI?
eg., if certain things like your hunger/thirst/stress/money are not being updated, that most likely means your framework has renamed the events.
We can not directly offer support with this, we create compatibility for default versions of frameworks. But what you need to do is change the event names in the client_customise_me.lua to the ones that currently work for your framework.
Error Codes
If you see an error code not listed below, please open a script support ticket in the Codesign Discord.
CHANGELOG
| Key | Meaning |
|---|---|
| Files Changed | Not every update requires replacing the entire folder. To avoid redoing your configs, use the option that applies: |
| 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.
v3.0.0 - v3.1.1
26/12/2020 - 10/08/2021 Full Re-Download RequiredChangelog:
Added
- Added config options for framework version.
- Added the ability to rename all esx events such as the setjob and playerloaded events.
- Added drag-and-drop compatibility for QBCore.
- Added 2 new files (stress and underwater_oxygen) to make them open-source and editable.
- Added a new config option to save the hunger/thirst/stress to the database without needing to use esx_status. This is more optimized than how esx_status saves to the database as now this data is only saved when a player exits the server or switches character.
- Added a new config option so you can choose the effect when a player's hunger/thirst is empty. By default, you can choose between slowly losing health or blurring the screen.
- Added a new system where if the usable food/drink items are spammed, they will get added to a queue and the animations will execute one at a time
- Added a staff command to reset a players status.
- Added the ability to set the under water oxygen from other scripts to support diving gear etc.
- Added support for cd_multicharacter when switching characters in game to reset the cached client side status data and re cache the new characters status data since you are able to save a characters data in the database now.
- Added the ability for customers to make their own apps.
Updated
- Changed disable move mode to right click instead of K.
- Updated the codesign error handlers.
- Allowed the stress value to be changed even tho config.stress is disabled.
- Added the oxygen (in water) to the GetStatus() export.
- Re-wrote and updated parts of the code.
- Reworked the logic behind getting a players money to be far more optimized so it does not need to get the data from the server-side anymore.
Fixed
- Fixed having to re-configure the hunger/thirst alert every time you relog.
- Fixed random server error on server start.
- Minor bug fixes.
- Fixed the scale locale 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.
- Fixed a typo which caused removing a status to only remove 1.
v4.0.0
Released: 05/11/2021 Full Re-Download RequiredChangelog:
Important
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).
Added
- Added compatibility for oxmysq
v4.0.1
Released: 08/11/2021 Update Specific Filesfxmanifest.lua - (IMPORTANT)
server/main/server.lua - (IMPORTANT)
client/main/client.lua - (IMPORTANT)
html (FULL FOLDER) - (IMPORTANT)Changelog:
Important
Authentication
- Small authentication update to ensure stability.
v4.0.2
Released: 09/11/2021 Full Re-Download Required **Changelog:**Added
- Added compatibility with new oxmysql version.
- Added compatibility with new qbcore permission changes.
Updated
- Added some extra checks to make sure important config options have been set correctly.
Fixed
Fix
- Fixed issue with blurred screen not resetting when setting or adding hunger/thirst using the /resetstatus command and other similar issues.