SN-IDCards

Step by step installation guide

Start Here

  1. Download the SN-IDCards file from keymaster.

  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

First, start by removing the native ID Event From your inventory resource

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

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:

['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'},

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

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

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

Last updated