QB-INVENTORY

Integration with QBCore Inventory users, follow the steps below

STEP [ 1 ] β€” Give, throw and Place item feature

  1. Open qb-inventory\server\main.lua

  2. Locate this Callback qb-inventory:server:giveItem

  3. Add the following line inside the item give logic

local itemData = GetItemByName(source, item)
if exports['sanba-realisticitemdrop']:Givethrow(source, itemData, amount) then
        cb(true)
        return
end

Your code should look something like this

STEP [ 2 ] β€” Drop item feature

  1. keep on qb-inventory\server\main.lua

  2. Locate this Function qb-inventory:server:createDrop

  3. Add the following line inside the item drop logic

Your code should look something like this

STEP [ 3 ]

  1. open qb-inventory\client\main.lua

  2. Locate this NUI Callback RegisterNUICallback('GiveItem', function(data, cb)

  3. Replace all the nui callback with the following

Your code should look something like this

Last updated