Instructions
qb-multicharacter
- Replace GiveStarterItems (opens in a new tab) function with
local function GiveStarterItems(source)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
for _, v in pairs(QBCore.Shared.StarterItems) do
if v.item == "id_card" or v.item == "driver_license" then
exports.bl_idcard:createLicense(source, v.item)
else
Player.Functions.AddItem(v.item, v.amount)
end
end
end
qb-inventory
- Delete 'driver_license' CreateUsableItem (opens in a new tab)
- Delete 'id_card' CreateUsableItem (opens in a new tab)
- Replace in command giveitem (opens in a new tab)
if itemData['name'] == 'id_card' or itemData['name'] == 'driver_license' or itemData['name'] == 'weaponlicense' or itemData['name'] == 'lawyerpass' then
exports.bl_idcard:createLicense(source, itemData['name'])
qb-cityhall
- Replace giveStarterItems (opens in a new tab) function with
local function giveStarterItems()
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return end
for _, v in pairs(QBCore.Shared.StarterItems) do
if v.item == "id_card" or v.item == "driver_license" then
exports.bl_idcard:createLicense(source, v.item)
else
Player.Functions.AddItem(v.item, v.amount)
end
end
end
- Replace qb-cityhall:server:requestId (opens in a new tab) event with
RegisterNetEvent('qb-cityhall:server:requestId', function(item, hall)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
local itemInfo = Config.Cityhalls[hall].licenses[item]
if not Player.Functions.RemoveMoney('cash', itemInfo.cost, 'cityhall id') then return TriggerClientEvent('QBCore:Notify', src, ('You don\'t have enough money on you, you need %s cash'):format(itemInfo.cost), 'error') end
exports.bl_idcard:createLicense(src, item)
end)