> For the complete documentation index, see [llms.txt](https://shift-studios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shift-studios.gitbook.io/docs/new/editor-8.md). Agents can also search and read this documentation through its [MCP server](https://shift-studios.gitbook.io/docs/~gitbook/mcp).

# ID Cards

Transform Your Server With Shift Studios — Powerful, Optimized, And Reliable Resources Built To Improve Every Experience.

<figure><img src="https://4062160621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fgqh3gjuJzDAWNXTD9sEE%2Fuploads%2FYZBUvvNmM0EJXd4ryDQB%2FGemini_Generated_Image_d1um2ld1um2ld1um.jpg?alt=media&amp;token=eb711322-01bc-42ba-a8e6-63f59c2ac6b7" alt=""><figcaption></figcaption></figure>

### Installation

{% stepper %}
{% step %}

### ID Cards

Read Everything Below To Install
{% endstep %}

{% step %}

### Drag & Drop

Drag & Drop The Resource Into Your FiveM Server
{% endstep %}

{% step %}

### Ensure The Resource

Make Sure To Ensure shift-idcards In Your Server CFG.
{% endstep %}

{% step %}

### Install The SQL Table

```sql
CREATE TABLE IF NOT EXISTS `shift_idcards` (
    `document_number` VARCHAR(32) NOT NULL,
    `owner_identifier` VARCHAR(80) NOT NULL,
    `document_type` VARCHAR(32) NOT NULL,
    `status` VARCHAR(16) NOT NULL DEFAULT 'valid',
    `issued_at` BIGINT NOT NULL,
    `expires_at` BIGINT NOT NULL,
    `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`document_number`),
    KEY `idx_owner_type` (`owner_identifier`, `document_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

```

{% endstep %}

{% step %}

### Install The Items & Images

```
Images Are Located Inside The Install Folder
```

{% code expandable="true" %}

```lua
['id_card'] = {
    label = 'State ID',
    weight = 20,
    stack = false,
    close = true,
    consume = 0,
    description = 'State issued identification card.',
    client = {
        export = 'shift-idcards.useStateId'
    }
},

['driver_license'] = {
    label = 'Driver License',
    weight = 20,
    stack = false,
    close = true,
    consume = 0,
    description = 'State issued driver license.',
    client = {
        export = 'shift-idcards.useDriverLicense'
    }
},

['weaponlicense'] = {
    label = 'Weapon License',
    weight = 20,
    stack = false,
    close = true,
    consume = 0,
    description = 'State issued firearms license.',
    client = {
        export = 'shift-idcards.useWeaponLicense'
    }
},
```

{% endcode %}
{% endstep %}

{% step %}

### Configure Resource

Make Sure To Configure The Resource To Your Liking

{% code expandable="true" %}

```lua
-- ⚫ ███████╗██╗  ██╗██╗███████╗████████╗    ███████╗████████╗██╗   ██╗██████╗ ██╗ ██████╗ ███████╗ ⚫
-- ⬛ ██╔════╝██║  ██║██║██╔════╝╚══██╔══╝    ██╔════╝╚══██╔══╝██║   ██║██╔══██╗██║██╔═══██╗██╔════╝ ⬛
-- ⚫ ███████╗███████║██║█████╗     ██║       ███████╗   ██║   ██║   ██║██║  ██║██║██║   ██║███████╗ ⚫
-- ⬛ ╚════██║██╔══██║██║██╔══╝     ██║       ╚════██║   ██║   ██║   ██║██║  ██║██║██║   ██║╚════██║ ⬛
-- ⚫ ███████║██║  ██║██║██║        ██║       ███████║   ██║   ╚██████╔╝██████╔╝██║╚██████╔╝███████║ ⚫
-- ⬛ ╚══════╝╚═╝  ╚═╝╚═╝╚═╝        ╚═╝       ╚══════╝   ╚═╝    ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ ⬛

Config = {}

-- auto, qbox, qb, esx, standalone
Config.Framework = 'auto'

Config.ShowDistance = 3.0
Config.UseCooldown = 1500
Config.ShowToSelfIfNoPlayerNearby = true
Config.AutoRegisterBlankCards = true


Config.Sharing = {
    -- true = using a card opens the custom nearby-player menu.
    playerPicker = true,

    -- When showing a document to another player, also open the same card for yourself.
    showToSelf = true,

    -- Adds a "View My Card" option to the player picker.
    showSelfOption = true,

    -- If nobody is nearby, automatically show the card to yourself instead.
    showSelfWhenAlone = true,

    -- Maximum number of nearby players shown in the picker.
    maxPlayers = 10,

    menuTitle = 'Show Identification',
    selfLabel = 'View My Card',
    selfDescription = 'Open this document for yourself.',
    playerDescription = 'Player ID: %s | Distance: %.1fm'
}

Config.UI = {
    -- right or left
    side = 'right',

    -- dark or light
    defaultTheme = 'dark'
}

Config.Shop = {
    enabled = true,

    -- cash or bank
    account = 'cash',

    prices = {
        id = 5000,
        driver = 10000,
        weapon = 100000
    },

    renewPrices = {
        id = 2500,
        driver = 5000,
        weapon = 50000
    },

    -- Suspended/revoked documents cannot be renewed by players at the shop.
    allowRenewSuspended = false,
    allowRenewRevoked = false,

    target = {
        label = 'Open Licensing',
        icon = 'fa-solid fa-id-card',
        distance = 2.0
    },

    -- Add as many locations as you want.
    locations = {
        {
            label = 'Licensing Office',
            coords = vec4(-545.55, -204.03, 38.22, 208.0),

            ped = {
                enabled = true,
                model = 's_m_m_highsec_01',
                scenario = 'WORLD_HUMAN_CLIPBOARD'
            },

            blip = {
                enabled = true,
                label = 'Licensing Office',
                sprite = 498,
                color = 0,
                scale = 0.6
            }
        },

        -- Example second location:
        -- {
        --     label = 'Sandy Shores Licensing',
        --     coords = vec4(1853.21, 3689.51, 34.27, 210.0),
        --     ped = {
        --         enabled = true,
        --         model = 's_m_m_highsec_01',
        --         scenario = 'WORLD_HUMAN_CLIPBOARD'
        --     },
        --     blip = {
        --         enabled = true,
        --         label = 'Licensing Office',
        --         sprite = 498,
        --         color = 0,
        --         scale = 0.75
        --     }
        -- }
    }
}


Config.Notifications = {
    -- ox, qb, esx, qbox, custom
    system = 'ox',

    -- ox_lib default
    position = 'center-left',
    duration = 3500,
    title = 'Identification',

    -- Generic compatibility for any other notification resource.
    -- If system = 'custom', configure either customEvent OR customExport.
    customEvent = '',

    customExport = {
        resource = '',
        name = ''
    }
}

Config.FallbackNationality = 'American Citizen'

Config.Items = {
    id = 'id_card',
    driver = 'driver_license',
    weapon = 'weaponlicense'
}

Config.Documents = {
    id = {
        label = 'State Identification',
        numberLabel = 'Document Number',
        prefix = 'ID',
        durationDays = 3650
    },

    driver = {
        label = 'Driver License',
        numberLabel = 'License Number',
        prefix = 'DL',
        durationDays = 730,
        class = 'C'
    },

    weapon = {
        label = 'Weapon License',
        numberLabel = 'License Number',
        prefix = 'WL',
        durationDays = 365
    }
}

Config.Statuses = {
    valid = 'Valid',
    suspended = 'Suspended',
    revoked = 'Revoked'
}

Config.AdminAce = 'shiftidcards.admin'

Config.Commands = {
    enabled = true,

    issue = {
        id = 'giveid',
        driver = 'givedriver',
        weapon = 'giveweapon'
    },

    setStatus = 'setlicense',
    renew = 'renewlicense'
}

Config.Text = {
    noPlayers = 'No players are close enough to show this document.',
    invalidItem = 'This document could not be verified.',
    wrongOwner = 'This document does not belong to you.',
    shown = 'You showed your %s to %s.',
    received = '%s showed you their %s.',
    cooldown = 'Please wait before showing another document.',
    invalidTarget = 'That player is no longer nearby.',
    noPermission = 'You do not have permission to use this command.',
    issueSuccess = 'Issued a %s to %s.',
    receiveIssue = 'You received a %s.',
    inventoryFull = 'That player cannot carry the document.',
    badDocumentType = 'Invalid document type. Use id, driver, or weapon.',
    badStatus = 'Invalid status. Use valid, suspended, or revoked.',
    noDocument = 'No matching document was found.',
    statusUpdated = '%s status updated to %s.',
    renewed = '%s renewed.',
    missingPlayer = 'Player not found.',
    purchaseSuccess = 'You purchased a %s for $%s.',
    notEnoughMoney = 'You do not have enough money for this document.',
    shopDisabled = 'The licensing shop is currently unavailable.',
    purchaseFailed = 'The document could not be purchased.',
    renewNoItem = 'You need to have your %s with you to renew it.',
    renewBlocked = 'Your %s cannot be renewed while it is %s.',
    renewSuccess = 'You renewed your %s for $%s. New expiration: %s.',
    renewFailed = 'The document could not be renewed.'
}

```

{% endcode %}
{% endstep %}

{% step %}

### Restart / Start Your Server

Ensure Everything Is Working Well & Enjoy !!
{% endstep %}
{% endstepper %}
