Version 1.x

This is for qb-inventory version 1.x, you can verify it in the fxmanifest.lua

  • Go to av_laptop/config/_inventory.lua and set

Config.OldQBInventory = true
  • Go to qb-inventory/fxmanifest.lua and delete any server_script line you might have and replace it with:

server_scripts {
    '@oxmysql/lib/MySQL.lua',
    'server/*.lua',
}
  • Place the following file in qb-inventory/server/ folder:

file-download
1KB
  • The following edits should be made in qb-inventory/server/main.lua

  • Search the event inventory:server:SetInventoryData, inside this event you should have a line pretty similar to this:

if (fromInventory == "player" or fromInventory == "hotbar") and (QBCore.Shared.SplitStr(toInventory, "-")[1] == "itemshop" or toInventory == "crafting") then
		return
end
  • Replace that line with the following:

  • Search the function SetItemData and replace it with:

  • Replace the function AddToStash:

  • Search the function addTrunkItems and replace it with:

  • Search for the event inventory:server:SaveInventory and replace it with:

  • Search for the event inventory:server:OpenInventory and do the following:

    • Add the parameter newLabel inside the function()

    • Replace secondInv.label = 'Stash-'..id with the following:

  • Should look something like this:

  • Copy/paste this code at the end of the file:

Last updated