Identity
Step by step installation guide, common issues & solutions, troubleshooting guide, code snippets, common error codes, config previews, locales 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.

Translate

START HERE

1. Unzip the cd_identity.zip folder and place this folder in your servers resource folder.
2. Add the resource to your server start config: ensure cd_identity (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.
4. If you use ESX legacy disable Config.Identity in the config.lua of es_extended.

INSTALLATION GUIDE

Step 1 - Install the SQL

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.
DO NOT SKIP THIS STEP OR THES SCRIPT WILL NOT FUNCTION CORRECTLY!

Step 2 - 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 3 - 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.
DO NOT SKIP THIS STEP OR THE SCRIPT WILL NOT FUNCTION CORRECTLY!
There are no required changes you need to make. All you need to do is simply configure the config.lua correctly.

INFORMATION

Chat commands

All of these chat commands can be renamed and disabled/enabled in the config/code.
Command
Description
/idcard
If enabled, this will allow you to show your id card to the closest player by. If no players are nearby, you will see your own id card.
/idcard_outside
This will show your id card to the closest player who NOT in a vehicle (useful in traffic stops for when you want to show your id card to an officer outside your vehicle instead of your passenger).
/identitytest
(Test Command) This is a test command which opens the passport UI.

SCRIPT NOT WORKING?

Common Issues

🔔 Folder Name Make sure the name of the folder is cd_identity.
SQL Default Value If you see an error similar to this example when inserting an SQL query into your database - “BLOB/TEXT column 'cd_identity' can't have a default value”.
✔️ You can use “VARCHAR(256)” instead of “LONGTEXT” in the SQL query.
SQL Unknown Column If you see an SQL error in the server console similar to this example - ER_BAD_FIELD_ERROR: Unknown colum 'cd_identity' in 'where clause'.
✔️ You are missing one of the required database columns. The SQL file can be found in the "READ_ME_AFTER_PURCHASING" folder.

Common Error Codes

Server
Client
021454 - The server event (cd_identity:CacheIdentityData) which caches a players data for for the id card has not been triggered.
465144 - There is an error in the client_customise_me.lua in the IdentitySaved() function. Please attempt to debug this yourself before contacting the Codesign Team.
3216354 - You are attempting to close the identity card UI but its already closed. this error code will not break anything in the resource, its more a warning.

Troubleshooting

1. Check if the script has authorized correctly. Check the server console to make sure there are no errors saying You lack the required entitlement? and check for 2 client-sided prints saying Loaded Successfully!.
2. Check for obvious error prints in the server console and the client F8 console. If you don't see any obvious errors make sure to restart the script while the server is live and check again.
3. Enable the test command in the config, restart the script and see if it works. If it works it means you have not installed/configured it correctly.
4. If none of the above worked, have a second read through the installation guide above, you may have missed something - you are only human.
If all else fails, contact the Codesign Team in the Codesign Discord.

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_identity 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.
v1.0.2
v4.0.0
v4.0.1

03/03/2021 - 27/07/2021

v1.0.2 - v1.0.7
Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • Added the ability to rename all esx events such as the setjob and playerloaded events.
  • Added support for CUI_character script.
  • Added a new config option to auto close the id card after x amount of seconds.
  • Added the ability to set a minimum age.
Edit
  • Updated the codesign error handlers.
  • Removed the dependency for screenshot basic as its not longer needed.
  • The resource is now drag-and-drop compatible with any multicharcter resource without having to make changes to external scripts.
Fix
  • Fixed a bug with the id card not showing your mugshot when showing your id card to another player.
  • Identity passport input field now support UTF-8 characters for languages other than English.
  • Fixed a issue where identity data did not load when creating a new character.
  • Fixed a typo when using the id card as an item which caused it to error.
  • Fixed the xPlayer.getName() returning the steam name instead of the characters roleplay name.
  • 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 the bug where id card date of issue and date of expiry only showed default values.
  • Fixed the bug where if you switch to female character then back to male, the female photo would still be showing.

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).

24/04/2022

Files Changed:
  • All files
  • Specific Files
Update Type:
  • Mandatory
  • Optional
Changelog:
Add
  • Added compatibility with the latest oxmysql.
  • When using esx_skin the default ped model will change depending on the sex you chose when you created your character.
  • Added the default events to open the esx_skin menu.