Update client.lua
This commit is contained in:
1 parent
db6a1045db
commit
ccf2219ad2
1 file changed
+6
@@ -1,5 +1,7 @@
|
|||||||
if GetResourceState('qb-inventory') ~= 'started' then return end
|
if GetResourceState('qb-inventory') ~= 'started' then return end
|
||||||
|
|
||||||
|
local qb = exports['qb-inventory']
|
||||||
|
|
||||||
Inventory = Inventory or {}
|
Inventory = Inventory or {}
|
||||||
|
|
||||||
RegisterNetEvent('community_bridge:client:qb-inventory:openStash', function(id, data)
|
RegisterNetEvent('community_bridge:client:qb-inventory:openStash', function(id, data)
|
||||||
@@ -8,6 +10,10 @@ RegisterNetEvent('community_bridge:client:qb-inventory:openStash', function(id,
|
|||||||
TriggerServerEvent('inventory:server:OpenInventory', 'stash', id, { maxweight = data.weight, slots = data.slots })
|
TriggerServerEvent('inventory:server:OpenInventory', 'stash', id, { maxweight = data.weight, slots = data.slots })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Inventory.HasItem = function(item)
|
||||||
|
return exports['qb-inventory']:HasItem(item)
|
||||||
|
end
|
||||||
|
|
||||||
Inventory.GetImagePath = function(item)
|
Inventory.GetImagePath = function(item)
|
||||||
local file = LoadResourceFile("qb-inventory", string.format("html/images/%s.png", 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)
|
local imagePath = file and string.format("nui://qb-inventory/html/images/%s.png", item)
|
||||||
|
|||||||
Reference in new issue
Block a user