diff --git a/modules/inventory/qb-inventory/client.lua b/modules/inventory/qb-inventory/client.lua index fc28b4a..3ac50d6 100644 --- a/modules/inventory/qb-inventory/client.lua +++ b/modules/inventory/qb-inventory/client.lua @@ -1,5 +1,7 @@ if GetResourceState('qb-inventory') ~= 'started' then return end +local qb = exports['qb-inventory'] + Inventory = Inventory or {} RegisterNetEvent('community_bridge:client:qb-inventory:openStash', function(id, data) @@ -8,8 +10,12 @@ RegisterNetEvent('community_bridge:client:qb-inventory:openStash', function(id, TriggerServerEvent('inventory:server:OpenInventory', 'stash', id, { maxweight = data.weight, slots = data.slots }) end) +Inventory.HasItem = function(item) + return exports['qb-inventory']:HasItem(item) +end + Inventory.GetImagePath = function(item) local file = LoadResourceFile("qb-inventory", string.format("html/images/%s.png", item)) local imagePath = file and string.format("nui://qb-inventory/html/images/%s.png", item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file +end