if not GetResourceState("jaksam_inventory"):find('start') then return end local config local inventory = {} function inventory.init() config = Modules.require("config") end function inventory.open(invType, info) lib.print.debug('[inventory.open] invType:', invType, 'info:', info) if invType == 'stash' then lib.print.debug('[inventory.open] Opening stash with ID:', type(info) == 'string' and info or info.id) exports['jaksam_inventory']:openInventory(type(info) == 'string' and info or info.id) elseif invType == 'shop' then exports['jaksam_inventory']:openInventory(info.type) else exports['jaksam_inventory']:openInventory(type(info) == 'string' and info or info.id) end end function inventory.getMedicalItems() local items = {} local inv = exports['jaksam_inventory']:getInventory() local playerItems = inv and inv.items or {} for _, itemData in pairs(playerItems) do if config.medicalItems[itemData.name] then items[#items + 1] = itemData end end return items end Modules.register('inventory', inventory, { dependencies = { 'config' } })