file-linesQB & ox_inv Issues

This is an experimental fix that I put together after having repeated issues with users following outdated guides for this setup. This issue is not present for all servers with such setups, it depends on versioning and whatnot.

We do not assist with fixing your inventory. QBCore & ox_inventory has never been 100% compatible, and most guides out there are outdated and they got no clue what is going on. We are not going to put together a whole guide for the entire process. This snippet is simply intended to fix a specific broken link that users seem to stumble upon.

The Fix:

Navigate into ox_inventory/modules/bridge/qb/server.lua and find the server.UseItem function. Replace the entire function with the snippet below:

function server.UseItem(source, itemName, data)
    local itemData = QBCore.Functions.CanUseItem(itemName)
    if type(itemData) == "table" and itemData.func then
        itemData.func(source, data)
    end
end

Last updated