Inventory
Our PanelAdmin system already includes several default inventories: QB-Inventory for QB-Core, OX, and Quasar Inventory. You can easily add your own inventory via exports. Here is the configuration of the Quasar inventory system integrated into our PPanelAdmin.
QS integration into PPanelAdmin
function InventoryBridge:GiveItem(xPlayer, itemName, count, metadata)
local playerId = xPlayer.source
local success, result = pcall(function()
return exports['qs-inventory']:AddItem(playerId, itemName, count, nil, metadata)
end)
return success and result
end
function InventoryBridge:GetAllItems()
local items = {}
local success, qsItems = pcall(function()
return exports['qs-inventory']:GetItemList()
end)
if success and qsItems then
for itemName, itemData in pairs(qsItems) do
table.insert(items, {
name = itemName,
label = itemData.label or itemName,
weight = itemData.weight or 0,
type = itemData.type or 'item',
unique = itemData.unique or false
})
end
end
return items
endLast updated