# SN-IDCards

* [<mark style="color:red;">**Buy Here**</mark>](https://skeletonnetworks.tebex.io/category/SN-IDCards)
* [<mark style="color:red;">**Join The Discord**</mark>](https://discord.gg/7JwdBJ5vFp)
* [<mark style="color:red;">**FiveM Forum Post**</mark>](https://forum.cfx.re/t/qbcore-paid-ids-police-badge-script/4900116)

## Start Here&#x20;

1. Download the SN-IDCards file from [<mark style="color:red;">**keymaster**</mark>](https://keymaster.fivem.net/)<mark style="color:red;">**.**</mark>
2. Unzip the file and drag the resource anywhere inside your server files while keeping the name "SN-IDCards" (If the name is changed the resource will not function)
3. Continue depending on your framework

{% tabs %}
{% tab title="QBCore" %}
First, start by removing the native ID Event From your inventory resource

\[Inventory Resource] > server > main.lua and delete the following lines:

```lua
QBCore.Functions.CreateUseableItem("driver_license", function(source, item)
         for k, v in pairs(QBCore.Functions.GetPlayers()) do
            local PlayerPed = GetPlayerPed(source)
            local TargetPed = GetPlayerPed(v)
            local dist = #(GetEntityCoords(PlayerPed) - GetEntityCoords(TargetPed))
            if dist < 3.0 then
               local gender = "Man"
               if item.info.gender == 1 then
                  gender = "Woman"lua
               end
               TriggerClientEvent('chat:addMessage', v,  {
                     template = '<div class="chat-message advert"><div class="chat-message-body"><strong>{0}:</strong><br><br> <strong>First Name:</strong> {1} <br><strong>Last Name:</strong> {2} <br><strong>Birth Date:</strong> {3} <br><strong>Gender:</strong> {4}<br><strong>Licenses:</strong> {5}</div></div>',
                     args = {
                        "Drivers License",
                        item.info.firstname,
                        item.info.lastname,
                        item.info.birthdate,
                        gender,
                        item.info.type
                     }
                  }
               )
            end
         end
      end)

      QBCore.Functions.CreateUseableItem("id_card", function(source, item)
         for k, v in pairs(QBCore.Functions.GetPlayers()) do
            local PlayerPed = GetPlayerPed(source)
            local TargetPed = GetPlayerPed(v)
            local dist = #(GetEntityCoords(PlayerPed) - GetEntityCoords(TargetPed))
            if dist < 3.0 then
               local gender = "Man"
               if item.info.gender == 1 then
                  gender = "Woman"
               end
               TriggerClientEvent('chat:addMessage', v,  {
                     template = '<div class="chat-message advert"><div class="chat-message-body"><strong>{0}:</strong><br><br> <strong>Civ ID:</strong> {1} <br><strong>First Name:</strong> {2} <br><strong>Last Name:</strong> {3} <br><strong>Birthdate:</strong> {4} <br><strong>Gender:</strong> {5} <br><strong>Nationality:</strong> {6}<br><strong>Fingerprint:</strong> {7}</div></div>',
                     args = {
                        "ID Card",
                        item.info.citizenid,
                        item.info.firstname,
                        item.info.lastname,
                        item.info.birthdate,
                        gender,
                        item.info.nationality,
                        item.info.fingerprint
                     }
                  }
               )
            end
         end
      end)
   
```

Second, You will need to add the items So in \[qb] > qb-core > shared > items.lua add the following lines:

```lua
['police_badge'] 				 = {['name'] = 'police_badge', 			  		['label'] = 'Police Badge', 			['weight'] = 0, 		['type'] = 'item', 		['image'] = 'police_badge.png', 		['unique'] = true, 		['useable'] = true, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'To identify yourself'},
  ['ems_idcard'] 					 = {['name'] = 'ems_idcard', 			  		['label'] = 'EMS ID', 				 	['weight'] = 0, 		['type'] = 'item', 		['image'] = 'ems_idcard.png', 		['unique'] = true, 		    ['useable'] = true, 	['shouldClose'] = false,   ['combinable'] = nil,   ['description'] = 'To identify yourself'},
```

{% endtab %}

{% tab title="ESX" %}
First, Install the sql **RunMe.sql** in your database

Second...   Oh thats it!
{% endtab %}
{% endtabs %}

(If you dont want to make your own images for the items here are mine :wink:)

* [<mark style="color:red;">**police\_badge**</mark>](https://cdn.discordapp.com/attachments/900164862427156570/1011878308679524382/police_badge.png)
* [<mark style="color:red;">**ems\_idcard**</mark>](https://media.discordapp.net/attachments/900164862427156570/1011971619096383559/ems_idcard.png)

### To update your call sign:

/callsign \[CallSignHere]

EX. /callsign C-101

and your callsign will be displayed on your ID immediately

### To update ID info:

**Option 1**:  If you have the option  `Config.CivilianCanEditID`  set to `true` in the config.lua\
any civilian can go to the npc they buy their id from and 3rd eye him and click edit ID

**Option 2**:  If you have jobs under option  `Config.WLJobs`  in the config.lua\
the jobs you have selected can use /updateid \[Player ID]\
EX. /updateid `3`&#x20;

(This will open the editor on the player with the server id `3` )
