Cadburry ScriptsCadburry Scripts

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.

lua
exports['cad-identity']:showIdentity(src, idtype, data)

Parameters:

  • src (number) – Player source ID.

  • idtype (string) – One of the identity types from Config.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).

lua
exports['cad-identity']:requestIdentity(src, idtype, data)

Parameters:

  • src (number) – Player source ID.

  • idtype (string) – One of the identity types from Config.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,
    background = data.background
    -- Add other fields as needed based on the selected identity type.
}

addLicense

Assign a license to the player’s identity.

lua
exports['cad-identity']:addLicense(src, license)

Parameters:

  • src (number) – Player source ID.

  • license (string) – One of the licenses defined in Config.Identities (e.g., 'driver').


removeLicense

Remove a license from the player’s identity.

lua
exports['cad-identity']:removeLicense(src, license)

Parameters:

  • src (number) – Player source ID.

  • license (string) – One of the licenses defined in Config.Identities (e.g., 'driver').


Notes

  • All identity types and licenses must be properly configured in your Config.Identities.

Last updated Cadburry Scripts