Skip to content

Commit 3c7ab53

Browse files
committed
Update hasItem check for ox_inventory
1 parent 8f3dbe1 commit 3c7ab53

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

it_bridge/modules/inventory/server/hasItem.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ function it.hasItem(source, item, amount, metadata)
3939
end
4040

4141
if it.inventory == Inventories.OX then
42-
local itemData = ox_inventory:GetItem(source, item, metadata or nil, false)
43-
if itemData then
44-
if itemData.count >= amount then return true else return false end
42+
local count = ox_inventory:GetItem(source, item, metadata or nil, true)
43+
if count then
44+
if count >= amount then return true else return false end
4545
end
4646
it.print.error('[hasItem] - Unable to get the item data. Please contact the developer.')
4747
return false

0 commit comments

Comments
 (0)