Page 1 of 1

esx_addoninventory

Posted: Thu Feb 26, 2026 6:41 pm
by greenie
https://github.com/esx-framework/ESX-Le ... ninventory

Special Inventory for Script, used by esx_society, to store items in a different inventory.

Usage
There is two types of inventories: shared and not shared.

Shared inventories doesn’t belong to a specific user. Example: foodstore items
None-shared inventories are created for every user in the server. They are created in db when player is loaded, Example: esx_property inventories.
Database Information
An addon inventory must be configured in the database before using it. you must run a server restart after this.

Table Structure

name
type: string
description: name of the inventory
label
type: string
description: label of the inventory (not used)
shared
type: boolean
description: is the inventory shared with others? (boolean either 0 or 1)
API
getInventory
Event: esx_addoninventory:getInventory
Usage: TriggerEvent('esx_addoninventory:getInventory', name, owner, function)
Example:
TriggerEvent('esx_addoninventory:getInventory', 'property', 'steam:0123456789', function(inventory)
inventory.removeItem('water', 1)
end)
getSharedInventory
Event: esx_addoninventory:getSharedInventory
Usage: TriggerEvent('esx_addoninventory:getSharedInventory', name, function)
Example:
TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory)
inventory.addItem('bread', 1)
end)