Player HUD - Smart Watch
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.

1. Unzip the cd_playerhud.zip folder and place this folder in your servers resource folder.
2. Add the resource to your server start config: ensure cd_playerhud (it must be placed anywhere below your framework resource eg., es_extended, not above). The name of the folder must not be changed or the resource will not function correctly.
3. WARNING do not edit the obfuscated files in any way.

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.

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.

ESX
QBCore
vRP
No-framework
Other (custom framework)
Note: In version 3.1.0+ esx_basicneeds and esx_status are not compatible. You need to remove both of these resources as everything you now need is built into cd_playerhud.

No? Then set the Config.BasicNeeds.ENABLE in the config.lua to false.
Yes? Then set the Config.BasicNeeds.ENABLE in the config.lua to true and configure the Config.BasicNeeds config options. You also need to add your usable food & drink items to the Config.BasicNeeds.Items config table.

No? Then set the Config.BasicNeeds.save_in_database in the config.lua to false.
Yes? Then set the Config.BasicNeeds.save_in_database in the config.lua to true and import the SQL file which 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.

No? Then set the Config.Stress.ENABLE in the config.lua to false.
Yes? Then set the Config.Stress.ENABLE in the config.lua to true and configure the Config.Stress config options.

No? Then set the Config.Stress.save_in_database in the config.lua to false.
Yes? Then set the Config.Stress.save_in_database in the config.lua to true and import the SQL file which 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.

We DO NOT recommend you use the built-in basic needs (hunger & thirst) system in cd_playerhud. Instead, we DO recommend you use the basic needs (hunger & thirst) system that is built into the QBCore base.
Note: Yes you can remove the default QBCore hud script, as we don't need that, it is the framework itself that handles the basic needs system, not the hud script.
So set the Config.BasicNeeds.ENABLE in the config.lua to false. You do not need to make any additional changes for this; it comes pre-configured to use the QBCore basic needs (hunger & thirst) metadata.

No? Then set the Config.Stress.ENABLE in the config.lua to false.
Yes? Then set the Config.Stress.ENABLE in the config.lua to true and configure the Config.Stress config options.

We DO recommend enabling this option as this comes pre-configured to save the data to the QBCore metadata.
So set the Config.Stress.save_in_database in the config.lua to true.
Disclaimer: When we recommend something, this does not mean these things are impossible, we say this as we recommend the easiest installation method. If you have the knowledge you can do almost anything with this resource as it is highly versatile.

We DO NOT recommend you use the built-in basic needs (hunger & thirst) system in cd_playerhud. Instead. we DO recommend you use the basic needs (hunger & thirst) system that is built into the vRP base.
So set the Config.BasicNeeds.ENABLE in the config.lua to false. You do not need to make any additional changes for this; it comes pre-configured to use the vRP basic needs (hunger & thirst) system.

No? Then set the Config.Stress.ENABLE in the config.lua to false.
Yes? Then set the Config.Stress.ENABLE in the config.lua to true and configure the Config.Stress config options.

We DO NOT recommend saving the stress in the database from cd_playerhud.
So make sure the Config.Stress.save_in_database in the config.lua to false. This is because as far as we know vRP does not by default support saving stress to the database.
Disclaimer: When we recommend something, this does not mean these things are impossible, we say this as we recommend the easiest installation method. If you have the knowledge you can do almost anything with this resource as it is highly versatile.

We DO NOT recommend you use the built-in basic needs system for cd_playerhud.
So make sure Config.BasicNeeds.ENABLE is set to false. This is because you would need a framework to have usable food & drink items.

No? Then set the Config.Stress.ENABLE in the config.lua to false.
Yes? Then set the Config.Stress.ENABLE in the config.lua to true and configure the Config.Stress config options.

We DO NOT recommend saving the stress in the database from cd_playerhud.
So make sure the Config.Stress.save_in_database in the config.lua to false. This is because you would need a database to save data to the database.
We CAN NOT offer installation support when implanting this resource into your custom framework. But all of the code required to convert this resource into other frameworks is open source to you.

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.
In order 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 on the correct position simply use the .app-screen class on your html element.
The existing apps are not editable, however you can change their order if you wish to do so.

Please Read Here for more information regarding key-mapping.
Key
Description
I
Toggle the watch UI.
K
Toggle move mode.
Right Click
Disable move mode.
Left / Right Arrows
Cycle through the screens.

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 said feature is enabled in the config.lua.
Command
Description
/watchhud
Toggle the watch UI.
/resetstatus
(Staff Only) Reset a player's hunger, thirst, stress, and oxygen stats.

These events are completely optional, you can use them if needed.
Add Status
Remove Status
Set Status
Reset Status
Toggle Watch UI
Here is some information about this event.
Event Name
Description
Event Type
TriggerEvent('cd_playerhud:status:add', Status_Type, Amount)
Add a status to a player.
client
What does Status_Type and Amount mean?
Status_Type (string)
Amount (number)
'hunger'
0 - 100 (0 is empty and 100 is full)
'thirst'
0 - 100 (0 is empty and 100 is full)
'stress
0 - 100 (0 is empty and 100 is full)
'oxygen'
0 - ∞ (You can add any amount, this is to support the use of diving gear, etc. But be sure to set a player's oxygen back to the maximum default value of 30 when the diving gear has been removed)
Do you need an example?
The example below will add 20 'hunger' to a player, when being triggered from the client-side to the client-side.
TriggerEvent('cd_playerhud:status:add', 'hunger', 20)
The example below will add 20 'hunger' to a player, when being triggered from the server-side to the client-side.
TriggerClientEvent('cd_playerhud:status:add', source, 'hunger', 20)
Here is some information about this event.
Event Name
Description
Event Type
TriggerEvent('cd_playerhud:status:remove', Status_Type, Amount)
Remove a status from a player.
client
What does Status_Type and Amount mean?
Status_Type (string)
Amount (number)
'hunger'
0 - 100 (0 is empty and 100 is full)
'thirst'
0 - 100 (0 is empty and 100 is full)
'stress
0 - 100 (0 is empty and 100 is full)
'oxygen'
0 - ∞ (You can remove any amount, this is to support the use of diving gear, etc. The maximum default value is 30)
Do you need an example?
The example below will remove 20 'stress' from a player, when being triggered from the client-side to the client-side.
TriggerEvent('cd_playerhud:status:remove', 'stress', 40)
The example below will remove 20 'stress' from a player, when being triggered from the server-side to the client-side.
TriggerClientEvent('cd_playerhud:status:remove', source, 'stress', 40)
Here is some information about this event.
Event Name
Description
Event Type
TriggerEvent('cd_playerhud:status:set', Status_Type, Amount)
Set a player's status.
client
What does Status_Type and Amount mean?
Status_Type (string)
Amount (number)
'hunger'
0 - 100 (0 is empty and 100 is full)
'thirst'
0 - 100 (0 is empty and 100 is full)
'stress
0 - 100 (0 is empty and 100 is full)
'oxygen'
0 - ∞ (You can set any amount, this is to support the use of diving gear, etc. But be sure to set a player's oxygen back to the maximum default value of 30 when the diving gear has been removed)
Do you need an example?
The example below will set a players 'oxygen' to 30, when being triggered from the client-side to the client-side.
TriggerEvent('cd_playerhud:status:set', 'oxygen', 30)
The example below will set a players 'oxygen' to 30, when being triggered from the server-side to the client-side.
TriggerClientEvent('cd_playerhud:status:set', source, 'oxygen', 30)
Here is some information about this event.
Event Name
Description
Event Type
TriggerServerEvent('cd_playerhud:ResetStatus')
Reset a player's status to the default values
server
Do you need an example?
The example below reset a player's statuses to the default values, when being triggered from the client-side to the server-side.
TriggerServerEvent('cd_playerhud:ResetStatus')
Here is some information about this event.
Event Name
Description
Event Type
TriggerEvent('cd_playerhud:OpenWatchUI', Action)
Open or close the watch UI from other scripts.
client
What does Action mean?
Action
Description
'open'
Open the watch UI.
'close'
Close the watch UI.
nil
If the Action is nil, this will toggle the watch UI.
Do you need an example?
The example below will show a players watch, when being triggered from the client-side to the client-side.
TriggerEvent('cd_playerhud:OpenWatchUI', 'open')
The example below will show a players watch, when being triggered from the server-side to the client-side.
TriggerClientEvent('cd_playerhud:OpenWatchUI', source, 'open')

These exports are completely optional, you can use them if needed.
client-side exports
Get Status
Returns the hunger, thirst, stress, and oxygen stats (table).
exports['cd_playerhud']:GetStatus()

Please check out our Troubleshooting Guide before contacting our support.
🔔 Folder Name Make sure the name of the folder is cd_playerhud.
Money/Hunger etc is not being updated on the UI? If certain things like your hunger/thirst/stress/money are not being updated, that most likely means your framework has renamed the events.

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
N/A

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_playerhud 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 its 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
4.0.0
v4.0.1
v4.0.2

v3.0.0 - v3.1.1
Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • 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.
Edit
  • 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.
Fix
  • 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.

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).
Add
  • Added compatibility for oxmysq

Files Changed:
  • All files
  • Specific Files
fxmanifest.lua - (IMPORTANT)
server/main/server.lua - (IMPORTANT)
client/main/client.lua - (IMPORTANT)
html (FULL FOLDER) - (IMPORTANT)
Update Type:
  • Mandatory
  • Optional
Changelog:
Authentication
  • Small authentication update to ensure stability.

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • Added compatibility with new oxmysql version.
  • Added compatibility with new qbcore permission changes.
Edit
  • Added some extra checks to make sure important config options have been set correctly.
Fix
  • Fixed issue with blurred screen not resetting when setting or adding hunger/thirst using the /resetstatus command and other similar issues.
Copy link
On this page
START HERE
INSTALLATION GUIDE
Step 1 - Fxmanifest
Step 2 - Configure the resource
Step 3 - Main
Create your own apps
INFORMATION
Default Key Binds
Chat commands
Events
Exports
COMMON ISSUES
ERROR CODES
CHANGELOG