--- Lower y upper cases are sensitives (openInventory not equal to old OpenInventory exports)exports.origen_inventory:openInventory(invType, id, data?)
exports.origen_inventory:openInventory('stash', 'my-stash', { label ='My Stash' })--- Or Simplyexports.origen_inventory:openInventory('stash', 'my-stash')
exports.origen_inventory:openInventory('trunk', 'my-stash', { label ='My Trunk' })--- Or Simplyexports.origen_inventory:openInventory('trunk', 'my-trunk')
GetInventory
Get Player inventory data
-- return table of items list-- The following exports do exactly the same thing, for compatibility between various scripts.exports.origen_inventory:GetInventory()exports.origen_inventory:getPlayerInventory()exports.origen_inventory:GetPlayerInventory()--- Examplelocal myItems = exports.origen_inventory:GetInventory()for slot, item inpairs(myItems) doif item.name =='id_card' then...endend
CloseInventory
Close player inventory
exports.origen_inventory:CloseInventory()
HasItem
Check if player has item
-- @return booleanexports.origen_inventory:HasItem(item_name)-- Example uselocal hasWater --[[true/false]]= exports.origen_inventory:HasItem("water")if hasWater then-- Do somethingend