function getShopDisplayInventory(identifier, cb, source)
local player = ESX.GetPlayerFromId(source)
InvType['shop'].getInventory(identifier, function(inventory)
local itemsObject = {}
for k, v in pairs(inventory) do
local esxItem = player.getInventoryItem(v.name)
local item = createDisplayItem(v, esxItem, tonumber(k), v.price)
local addItem = true
item.usable = false --morph3
item.giveable = false --morph3
item.canRemove = false --morph3
if v.grade ~= nil then
if player.job.grade < v.grade then
addItem = false
end
end
if Config.CheckLicense and v.license ~= nil then
-- { name = "disc_ammo_pistol", price = 100, count = 1, license = "weaponlicenseone" },
if player.getInventoryItem(v.license).count <= 0 then
addItem = false
end
end
if addItem then
table.insert(itemsObject, item)
end
end
local inv = {
invId = identifier,
invTier = InvType['shop'],
inventory = itemsObject,
cash = 0,
black_money = 0
}
cb(inv)
end)
end