๐งInstallation
Here we're going to guide you in the installation of origen_inventory.
First we want you to know that our script only supports the following versions of the two most used frameworks, in older versions it may be usable but we do not provide support since the development focuses on the following versions:
VERY IMPORTANT for any framework
For a safe startup, please do not put your framework and inventory folders in shared folders (they are in brackets)
If you do:
ensure qb-core
ensure origen_inventory
And, we assume that origin_inventory is inside [origen] and then do:
ensure [origen]
This will cause origin_inventory to restart again and make it error out, same for core.
REMOVE THESE RESOURCES FROM BRACKETS FOLDERS AND SET ON ROOT RESOURCES FOLDER.
ensure oxmysql
ensure qb-core
ensure origen_inventory
...(make sure starts other scripts that use inventory functions after the origen_inventory)Now you have to insert the SQL files into your database:
Qb-Inventory Compatibility
Go to origen_inventory/fxmanifest.lua and uncomment:
-- Before:
-- provide 'qb-inventory'
-- After:
provide 'qb-inventory'Since this and the latest versions of the inventory, installing Origen Inventory has been easier than ever.
We only need to place two files without making any modifications to the framework.
1. ESX Config
Go to es_extended/shared/config/main.lua
Find Config.CustomInventory
Replace by
Config.CustomInventory = 'origen_inventory'Comment or remove on
es_extended/shared/config/main.lua-- DO NOT CHANGE BELOW THIS LINE !!! <--- ignore this <3 ------------------------------------- if GetResourceState("ox_inventory") ~= "missing" then Config.CustomInventory = "ox" endDone!
2. Install files
Go to es_extended/server/bridge/inventory
Copy the file below
Go to es_extended/server/classes/overrides
Copy the file below
3. Start the script in your server.cfg
Now you need to put the start in your server.cfg file. Like this form:
ensure oxmysql
ensure ox_lib
ensure es_extended
ensure origen_inventory
...(make sure starts other scripts that use inventory functions after the origen_inventory)Enjoy ๐
Just for inventory version 2.0
Go to qbx_core/server/main.lua y remove lines 5-8:
elseif not lib.checkDependency('ox_inventory', '2.42.1', true) then
startupErrors, errorMessage = true, 'ox_inventory version 2.42.1 or higher is required'
elseif GetConvar('inventory:framework', '') ~= 'qbx' then
startupErrors, errorMessage = true, 'inventory:framework must be set to "qbx" in order to use qbx_core'Go to origen_inventory/fxmanifest.lua and uncomment:
-- Uncomment if you have qbx_core installed
provide 'ox_inventory'Go to qbx_core/bridge/qb/shared/main.lua comment lines 3-65:
-- qbShared.Items = {}
-- local oxItems = require '@ox_inventory.data.items'
-- for item, data in pairs(oxItems) do
-- qbShared.Items[item] = {
-- name = item,
-- label = data.label,
-- weight = data.weight or 0,
-- type = 'item',
-- image = data.client?.image or string.strjoin(item,'.png'),
-- unique = false,
-- useable = true,
-- shouldClose = data.close or true,
-- combinable = nil,
-- description = data.description or nil
-- }
-- end
-- local oxWeapons = require '@ox_inventory.data.weapons'
-- for weapon, data in pairs(oxWeapons.Weapons) do
-- weapon = string.lower(weapon)
-- qbShared.Items[weapon] = {
-- name = weapon,
-- label = data.label,
-- weight = data.weight,
-- type = 'weapon',
-- ammotype = data.ammoname or nil,
-- image = data.client?.image or string.strjoin(weapon,'.png'),
-- unique = true,
-- useable = false,
-- shouldClose = true,
-- combinable = nil,
-- description = nil
-- }
-- end
-- for component, data in pairs(oxWeapons.Components) do
-- component = string.lower(component)
-- qbShared.Items[component] = {
-- name = component,
-- label = data.label,
-- weight = data.weight,
-- type = 'component',
-- image = data.client?.image or string.strjoin(component,'.png'),
-- unique = true,
-- useable = false,
-- shouldClose = true,
-- combinable = nil,
-- description = data.description
-- }
-- end
-- for ammo, data in pairs(oxWeapons.Ammo) do
-- ammo = string.lower(ammo)
-- qbShared.Items[ammo] = {
-- name = ammo,
-- label = data.label,
-- weight = data.weight,
-- type = 'ammo',
-- image = data.client?.image or string.strjoin(ammo,'.png'),
-- unique = true,
-- useable = false,
-- shouldClose = true,
-- combinable = nil,
-- description = data.description
-- }
-- endGo to qbx_core/bridge/qb/server/main.lua and comment lines 6-7:
-- local convertItems = require 'bridge.qb.shared.compat'.convertItems
-- convertItems(require '@ox_inventory.data.items', require 'shared.items')Go to qbx_core/server/player.lua and comment lines 1251-1253:
-- if accountsAsItems[oxMoneyType] then
-- exports.ox_inventory:SetItem(source, oxMoneyType, playerMoney[moneyType])
-- endStart your script in your server.cfg. Following this form:
ensure oxmysql
ensure ox_lib
ensure es_extended
ensure origen_inventory
...(make sure starts other scripts that use inventory functions after the origen_inventory)Last updated