QBOX

Ready Edited Files

It is a ready edited file for qbx. if you use this file you don't need to make any changes

v1.23.0

Deleting Script

  1. If you have ox_inventory script delete it

Note: Some of your scripts may not work without ox_inventory. Therefore, check the errors in your console and adjust the fxmanifest files of the scripts that require ox_inventory. When you make these adjustments, you might encounter export errors. Replace the old exports with the exports from tgiann-inventory to fix these issues.

Removing the Ox Inventory requirement

  1. Open "qbx_core\server\main.lua" file

  2. Find and delete the 4 lines in the screenshot

  1. Open "qbx_core\bridge\qb\server\main.lua" file

  2. Find and delete the 2 lines in the screenshot

  1. Open "qbx_core\bridge\qb\shared\main.lua" file

  2. Find and delete all codes in the screenshot

  1. Open "qbx_core\shared\main.lua" file

  2. and add the following code on line 2

TriggerEvent("__cfx_export_tgiann-inventory_Items", function(ref)
    if not ref then return end
    qbShared.Items = ref()
end)

AddEventHandler("tgiann-inventory:itemList", function(items)
    qbShared.Items = items
end)

Edit HasItem Functions

  1. Open "qbx_core\bridge\qb\client\functions.lua" file

  2. Find the "functions.HasItem = function(items, amount)" and replace it with the following code

functions.HasItem = function(items, amount)
    return exports['tgiann-inventory']:HasItem(items, amount)
end
  1. Open "qbx_core\bridge\qb\server\functions.lua" file

  2. Find the "functions.HasItem = function(source, items, amount) -- luacheck: ignore" and replace it with the following code

functions.HasItem = function(source, items, amount) -- luacheck: ignore
    return exports['tgiann-inventory']:HasItem(source, items, amount)
end
  1. Open "qbx_core\modules\utlis.lua" file

  2. Find the "functions.HasItem = function(source, items, amount) -- luacheck: ignore" and replace it with the following code

function HasItem(source, items, amount) -- luacheck: ignore
    return exports['tgiann-inventory']:HasItem(source, items, amount)
end
  1. Find the "functions.HasItem = function(items, amount) -- luacheck: ignore" and replace it with the following code

function HasItem(items, amount) -- luacheck: ignore
    return exports['tgiann-inventory']:HasItem(items, amount)
end

Convert Ox Inventory Data to TGIANN Inventory Data

  1. Upload sql_main.sql to your database

  2. Start tgiann-inventory and use convertox ( server/convert.lua ) on cmd/live console

Last updated