diff --git a/gamemode/core/meta/sh_inventory.lua b/gamemode/core/meta/sh_inventory.lua index 605c544f4..586457ee4 100644 --- a/gamemode/core/meta/sh_inventory.lua +++ b/gamemode/core/meta/sh_inventory.lua @@ -342,12 +342,18 @@ function META:HasItem(targetID, data) if (v.uniqueID == targetID) then if (data) then local itemData = v.data + local bFound = true for dataKey, dataVal in pairs(data) do if (itemData[dataKey] != dataVal) then - return false + bFound = false + break end end + + if (!bFound) then + continue + end end return v @@ -364,12 +370,18 @@ function META:HasItemOfBase(baseID, data) if (v.base == baseID) then if (data) then local itemData = v.data + local bFound = true for dataKey, dataVal in pairs(data) do if (itemData[dataKey] != dataVal) then - return false + bFound = false + break end end + + if (!bFound) then + continue + end end return v