From 57de95f880905a899382583e917d1ea5f8c78a76 Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Mon, 30 Sep 2024 12:52:16 -0700 Subject: [PATCH] Update functions.lua --- server/functions.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/functions.lua b/server/functions.lua index 5e71cf2..bfc99d0 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -102,9 +102,10 @@ function Itemcheck(source, item, amount) return false end elseif inventory == 'ox' then - local has = exports.ox_inventory:GetItem(source, item , nil, true) - if has >= amount then - return true + local item = ox_inventory:GetItem(source, item, nil, false) + if item.count >= amount then + return true + end else Notifys(source, 'You Need ' .. amount .. ' Of ' .. GetLabels(item) .. ' To Do This', 'error') return false