fix(server/functions): object amount parameter

This commit is contained in:
BerkieBb
2022-06-23 21:40:59 +02:00
committed by GitHub
parent 4fc5e46d0b
commit 0b2f3c2a4e
+1 -1
View File
@@ -387,7 +387,7 @@ function QBCore.Functions.HasItem(source, items, amount)
for k, v in pairs(items) do
local itemKV = {k, v}
local item = Player.Functions.GetItemByName(itemKV[kvIndex])
if item and ((not amount and not isArray and item.amount >= v) or (isArray and amount and item.amount >= amount) or (not amount and isArray)) then
if item and ((amount and item.amount >= amount) or (not isArray and item.amount >= v) or (not amount and isArray)) then
count += 1
end
end