qs-inventory will work automatically. No changes needed. Simply start this script after qs-inventory (Make sure that your qs-inventory is up to date)
If you are using the v3 version. It is not possible for us to add an integration. You will need to contact Quasar
es_extended (default inventory)
This might be a bit different depending on the version of your es_extended. Make sure to look at the surrounding lines of code around the new lines provider in the example
es_extended/client/functions.lua
Add the following line to the line 819
table.insert(elements, {label = _U('place'), action = 'kq-place', type = data.current.type, value = data.current.value})
Example:
if data.current.usable then
table.insert(elements, {label = _U('use'), action = 'use', type = data.current.type, value = data.current.value})
end
table.insert(elements, {label = _U('place'), action = 'kq-place', type = data.current.type, value = data.current.value})
if data.current.canRemove then
if player ~= -1 and distance <= 3.0 then
table.insert(elements, {label = _U('give'), action = 'give', type = data.current.type, value = data.current.value})
end
table.insert(elements, {label = _U('remove'), action = 'remove', type = data.current.type, value = data.current.value})
end
Add the following lines under the line 941 (originally 940)
elseif data1.current.action == 'kq-place' then
TriggerEvent('kq_materialize:client:hookPlaceItem', item, 1)
ESX.UI.Menu.CloseAll()
Example:
elseif data1.current.action == 'use' then
TriggerServerEvent('esx:useItem', item)
elseif data1.current.action == 'kq-place' then
TriggerEvent('kq_materialize:client:hookPlaceItem', item, 1)
ESX.UI.Menu.CloseAll()
elseif data1.current.action == 'return' then
ESX.UI.Menu.CloseAll()
ESX.ShowInventory()
es_extended/locales/en.lua (or the locale you use)