Installation · origen_inventory
Follow the steps below to install origen_inventory on your server.
1. Add the resource to your server
Copy the origen_inventory folder into your resources directory and add it to your server.cfg.
The ensure order is important — every dependency must be running before origen_inventory.
# server.cfg
ensure oxmysql
ensure ox_lib
ensure qb-core # or es_extended / qbx_core
# Optional integrations
ensure qs-smartphone-pro # or lb-phone
ensure origen_clothing # only if you use Clothes-As-Item
ensure origen_inventoryNever start origen_inventory before oxmysql and your framework core. Without them the database driver and bridge layer will fail to initialize and inventories will not load.
2. Replace your previous inventory
If you are migrating from another inventory resource you must remove (or disable) it before starting origen_inventory. There can only be one active inventory provider at a time.
If your other scripts depend on qb-inventory or ox_inventory exports, open fxmanifest.lua and uncomment the matching provide line so those export calls resolve to origen_inventory:
-- Uncomment if you have old scripts that use qb-inventory
-- provide 'qb-inventory'
-- Uncomment if you have qbx_core installed
-- provide 'ox_inventory'3. Import the SQL schema
Import the file origen_inventory.sql into your database. It creates the four tables required by the resource: gloveboxitems, stashitems, trunkitems, origen_customitems and origen_inventory_equipped_clothes.
CREATE TABLE IF NOT EXISTS `gloveboxitems` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`plate` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
`items` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`label` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`slots` INT(11) NULL DEFAULT NULL,
`personal` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`weight` INT(11) NULL DEFAULT NULL,
`job` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
PRIMARY KEY (`plate`) USING BTREE,
INDEX `id` (`id`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=152;
CREATE TABLE IF NOT EXISTS `stashitems` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`stash` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
`items` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`label` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`slots` INT(11) NULL DEFAULT NULL,
`job` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`personal` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`weight` INT(11) NULL DEFAULT NULL,
PRIMARY KEY (`stash`) USING BTREE,
INDEX `id` (`id`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `trunkitems` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`plate` VARCHAR(255) NOT NULL COLLATE 'latin1_swedish_ci',
`items` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`label` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`personal` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
`weight` INT(11) NULL DEFAULT NULL,
`slots` INT(11) NULL DEFAULT NULL,
`job` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
PRIMARY KEY (`plate`) USING BTREE,
INDEX `id` (`id`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1;
DROP TABLE IF EXISTS `origen_customitems`;
CREATE TABLE `origen_customitems` (
`name` VARCHAR(100) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`label` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`weight` INT(11) NOT NULL DEFAULT '0',
`type` VARCHAR(50) NOT NULL DEFAULT 'item' COLLATE 'utf8mb4_unicode_ci',
`image` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`description` TEXT NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`unique` TINYINT(1) NOT NULL DEFAULT '0',
`rarity` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_unicode_ci',
`stack` TINYINT(1) NOT NULL DEFAULT '0',
`close` TINYINT(1) NOT NULL DEFAULT '1',
`server` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`client` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`decay` INT(11) NULL DEFAULT NULL,
`buttons` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
PRIMARY KEY (`name`) USING BTREE,
CONSTRAINT `server` CHECK (json_valid(`server`)),
CONSTRAINT `client` CHECK (json_valid(`client`)),
CONSTRAINT `buttons` CHECK (json_valid(`buttons`))
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;
CREATE TABLE IF NOT EXISTS `origen_inventory_equipped_clothes` (
`identifier` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_unicode_ci',
`data` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
`last_updated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`identifier`) USING BTREE,
CONSTRAINT `data_json` CHECK (json_valid(`data`))
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
;origen_customitems is dropped and recreated by the import file. If you already have custom items registered, back them up before running the SQL again.
4. Items
origen_inventory ships its own item dictionary (config/items.lua and config/weapons.lua). When you replace your previous inventory:
- QBCore / QBX: You can keep using your existing
shared/items.luaif your scripts depend on it. The bridge inbridge/qbcore/server/items.luaandbridge/qbx/server/players.luareads through both sources. - ESX: Items declared in the framework
itemstable will be loaded as well viabridge/esx/server/items.lua. - Custom items: Items added at runtime through
exports.origen_inventory:AddCustomItem(...)are persisted inorigen_customitemsand reloaded automatically on resource start.
5. Configure the resource
Open config.lua, config_sv.lua and the files inside config/ and adjust them for your server. See the Configuration page for the full list of options.
The minimum you should review before going live:
Config.Framework(auto-detected; only override if you run a custom fork)Config.LanguageConfig.Phone.ResourceConfig.ProgressbarConfig.Player.MaxWeightandConfig.Player.MaxInventorySlots- Webhook URLs in
config_sv.lua
6. Verify installation
After starting the server, join with a player and confirm:
- Pressing
F2opens the player inventory. - Pressing
TABtoggles the hotbar (ifConfig.UI.Hotbar = true). - Vehicle trunks open at the back of the vehicle (within
Config.TrunkOpenDistance). - Vehicle gloveboxes open while inside the vehicle.
- Stashes declared in
config/stashes.luashow their marker on the configured locations. - Shops declared in
config/shops.luashow their blip and marker. - Items are saved between sessions (player disconnect / reconnect).