mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Fix HasItem check if amount is provided and item not found (#741)
* fix(server/events): amount checking fix * fix(client/functions): item checking fix
This commit is contained in:
+1
-1
@@ -238,7 +238,7 @@ QBCore.Functions.CreateCallback('QBCore:HasItem', function(source, cb, items, am
|
||||
end
|
||||
else -- Single item as string
|
||||
local item = Player.Functions.GetItemByName(items)
|
||||
if item and not amount or (amount and item.amount >= amount) then
|
||||
if item and not amount or (item and amount and item.amount >= amount) then
|
||||
retval = true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user