> For the complete documentation index, see [llms.txt](https://five-developments.gitbook.io/scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://five-developments.gitbook.io/scripts/scripts/five-idcard/setup.md).

# Setup

Before starting, you'll need to create the item that you've inserted in your `config.lua` file in your inventory system.\
We currently support **5 different inventories** thanks to [alp1x](https://github.com/alp1x)'s [bridge](https://github.com/alp1x/um-idcard/main/bridge)!

## 🧨 ESX

Setup on **es\_extended** is really easy!\
Go into your **esx\_multicharacter** server-side file `esx_multicharacter\server\main.lua` and replace lines 228 to line 232 with this:

```lua
-- esx_multicharacter line 228
AddEventHandler("esx_identity:completedRegistration", function(source, data)
    TriggerEvent("esx:onPlayerJoined", source, PREFIX .. awaitingRegistration[source], data)
    awaitingRegistration[source] = nil
    ESX.Players[GetIdentifier(source)] = true
    exports['five-idcard']:CreateMetaLicense(source)
end)
```

It will automatically give the **identity card** when the user has just registered.

## 🧧 QBCore

Go into your **qb-multicharacter** server-side file `qb-multicharacter/server/main.lua` and replace `GiveStarterItems` function with this:

```lua
-- qb-multicharacter line 6
local function GiveStarterItems(source)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)

    for _, v in pairs(QBCore.Shared.StarterItems) do
        Player.Functions.AddItem(v.item, v.amount, false, info)
    end
    return exports['five-idcard']:CreateMetaLicense(source)
end
```

It will automatically give the **identity card** when the user has just registered. You'll also have to remove **id\_card** from the **StarterItems** in your `qb-core/shared/main.lua` config.

### ✨ Extra

If you want to give yourself the **id card**, you can add this command to the `server.lua` of **five-idcard:**

```lua
QBCore.Commands.Add('givedocs', "Give yourself documents", {}, false, function(source)
    exports["five-idcard"]:CreateMetaLicense(source)
end, 'admin')
```

## ❓ Need support?

You still don't know how to proceed? \
We know this is not **beginner-friendly**, so we will give you **free** setup support on our [Discord Server](https://discord.gg/547nKvQhZ7)!
