mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
fix(server/functions): object amount parameter
This commit is contained in:
@@ -387,7 +387,7 @@ function QBCore.Functions.HasItem(source, items, amount)
|
|||||||
for k, v in pairs(items) do
|
for k, v in pairs(items) do
|
||||||
local itemKV = {k, v}
|
local itemKV = {k, v}
|
||||||
local item = Player.Functions.GetItemByName(itemKV[kvIndex])
|
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
|
count += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user