From 3542aff067f0665210e96271b4160056b44c7551 Mon Sep 17 00:00:00 2001 From: PenguScripts <102926606+PenguScript@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:48:47 -0500 Subject: [PATCH] Update client.lua --- modules/inventory/jpr-inventory/client.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/inventory/jpr-inventory/client.lua b/modules/inventory/jpr-inventory/client.lua index d29debf..cf5a4df 100644 --- a/modules/inventory/jpr-inventory/client.lua +++ b/modules/inventory/jpr-inventory/client.lua @@ -1,5 +1,6 @@ if GetResourceState('jpr-inventory') ~= 'started' then return end +local jpr = exports['jpr-inventory'] Inventory = Inventory or {} RegisterNetEvent('community_bridge:client:jpr-inventory:openStash', function(id, data) @@ -8,8 +9,12 @@ RegisterNetEvent('community_bridge:client:jpr-inventory:openStash', function(id, TriggerServerEvent('inventory:server:OpenInventory', 'stash', id, { maxweight = data.weight, slots = data.slots }) end) +Inventory.HasItem = function(item) + return jpr:HasItem(item) +end + Inventory.GetImagePath = function(item) local file = LoadResourceFile("jpr-inventory", string.format("html/images/%s.png", item)) local imagePath = file and string.format("nui://jpr-inventory/html/images/%s.png", item) return imagePath or "https://avatars.githubusercontent.com/u/47620135" -end \ No newline at end of file +end