client side GetItemCount
Qbox is hardcoded for ox and the only inventory I know that supports it other than ox is quasar, both are bridged so should be completely fine
This commit is contained in:
1 parent
9ad8c6188c
commit
e5190cdca0
8 files changed
+70
No files matched your search
@@ -79,6 +79,20 @@ Framework.HasItem = function(item)
|
||||
return QBCore.Functions.HasItem(item)
|
||||
end
|
||||
|
||||
---comment
|
||||
---@param item string
|
||||
---@return number
|
||||
Framework.GetItemCount = function(item)
|
||||
local frameworkInv = QBCore.Functions.GetPlayerData().items
|
||||
local count = 0
|
||||
for _, v in pairs(frameworkInv) do
|
||||
if v.name == item then
|
||||
count = count + v.amount
|
||||
end
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
||||
Framework.GetPlayerInventory = function()
|
||||
local items = {}
|
||||
local frameworkInv = QBCore.Functions.GetPlayerData().items
|
||||
|
||||
Reference in new issue
Block a user