I've added a new line to the identity cards.
local ShowId = function(source, item, nui)
local found = false
local character = QBCore.Functions.GetPlayer(source)
local PlayerPed = GetPlayerPed(source)
local PlayerCoords = GetEntityCoords(PlayerPed)
local info = {
['name'] = item.info.firstname,
['lastname'] = item.info.lastname,
['gender'] = item.info.gender,
['dob'] = item.info.birthdate,
['nationality'] = item.info.nationality,
['type'] = item.info.type,
['citizenid'] = item.info.citizenid
}
for k, v in pairs(QBCore.Functions.GetPlayers()) do
local TargetPed = GetPlayerPed(v)
local dist = #(PlayerCoords - GetEntityCoords(TargetPed))
if dist < 3.0 and PlayerPed ~= TargetPed then
TriggerClientEvent('QBCore:Notify', source, "You showed your card")
TriggerClientEvent('qb-idcard:client:open', v, info, nui)
found = true
break
end
end
if not found then
TriggerClientEvent('qb-idcard:client:open', source, info, nui)
end
end
It works for the most part - the line I added was ['citizenid'] = item.info.citizenid
. It will only show up on the other identity cards IF I open the ID Card first. So it will not show on driver's license, lawyers pass, weapon license, nothing unless ID card is opened first...
Is there a way to get it to show on ALL cards right away?