Exports
Quality of life scripts for your FiveM server. Performance optimized resources that install in minutes, with free updates and support that actually answers.
The following exports allow interaction with the cad-identity system. You can display identities, request them from users, generate fake identities, and manage licenses.
showIdentity
Display a specific identity for a player.
exports['cad-identity']:showIdentity(src, idtype, data)Parameters:
src(number) β Player source ID.idtype(string) β One of the identity types fromConfig.Identities(e.g.,'customidcard').data(table, optional) β Identity metadata. Can include:lua{ citizenid = data.citizenid, firstname = data.firstname, lastname = data.lastname, dob = data.dob, sex = data.gender, height = data.height, photo = data.photo -- Add other fields as needed based on the selected identity type. }
requestIdentity
Request the player to create or show an identity (with provided data or default player data).
exports['cad-identity']:requestIdentity(src, idtype, data)Parameters:
src(number) β Player source ID.idtype(string) β One of the identity types fromConfig.Identities(e.g.,'customidcard').`data` (table, optional) β Identity metadata. Can include:
{
citizenid = data.citizenid,
firstname = data.firstname,
lastname = data.lastname,
dob = data.dob,
sex = data.gender,
height = data.height,
photo = data.photo,
background = data.background
-- Add other fields as needed based on the selected identity type.
}addLicense
Assign a license to the playerβs identity.
exports['cad-identity']:addLicense(src, license)Parameters:
src(number) β Player source ID.license(string) β One of the licenses defined inConfig.Identities(e.g.,'driver').
removeLicense
Remove a license from the playerβs identity.
exports['cad-identity']:removeLicense(src, license)Parameters:
src(number) β Player source ID.license(string) β One of the licenses defined inConfig.Identities(e.g.,'driver').
Notes
All identity types and licenses must be properly configured in your
Config.Identities.
