🔧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:

IMPORTANT

From versions 1.9.8 onwards, installation of QB-Core is automatic and requires NO code modifications.

Just install the SQL and the changes that appear in the video.

server.cfg
ensure oxmysql
ensure qb-core
ensure origen_inventory
...(make sure to start other scripts that use inventory functions after the origen_inventory)

Now you have to insert the SQL files into your database:

Add some code

Go to qb-core/server/functions.lua replace those functions:

function QBCore.Functions.CreateUseableItem(item, data)
    QBCore.UsableItems[item] = data
    exports['origen_inventory']:CreateUseableItem(item, data)
end
function QBCore.Functions.UseItem(source, item)
    if GetResourceState('origen_inventory') == 'missing' then return end
    exports['origen_inventory']:UseItem(source, item)
end
function QBCore.Functions.HasItem(source, items, amount)
    if GetResourceState('origen_inventory') == 'missing' then return end
    return exports['origen_inventory']:HasItem(source, items, amount)
end

Go to qb-core/server/player.lua, replace those functions:

function QBCore.Player.GetTotalWeight(items)
    if GetResourceState('origen_inventory') == 'missing' then return 0 end
    return exports['origen_inventory']:GetTotalWeightByItems(items)
end

Replace all the qb-inventory strings with origen_inventory in all the resources folder using visual studio code:

Last updated