RegisterNetEvent('qb-police:client:openArmoury', function()
local authorizedItems = {
label = Config.Items.label,
slots = Config.Items.slots,
items = {}
}
local index = 1
for _, armoryItem in pairs(Config.Items.items) do
for i=1, #armoryItem.authorizedJobGrades do
if armoryItem.authorizedJobGrades[i] == PlayerJob.grade.level then
authorizedItems.items[index] = armoryItem
authorizedItems.items[index].slot = index
index = index + 1
end
end
end
SetWeaponSeries()
if Config.Inventory == 'ox_inventory' then
TriggerServerEvent('police:server:openShop', 'policeshop', authorizedItems)
else
TriggerServerEvent('inventory:server:OpenInventory', 'shop', 'police', authorizedItems)
end
end)