From c7192ff2e275be858a0cae65aecd75da8886f72a Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Sun, 30 Jun 2024 17:35:26 -0700 Subject: [PATCH] Update functions.lua --- client/functions.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index 16e7588..c5f3b80 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -83,8 +83,12 @@ end function ItemCheck(item) local success -if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end -if QBCore.Functions.HasItem(item) then success = item return success else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') end +if GetResourceState('ox_inventory') == 'started' then + if exports.ox_inventory:GetItemCount(item) >= 1 then return true else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') end +else + if QBCore.Shared.Items[item] == nil then print("There Is No " .. item .. " In Your QB Items.lua") return end + if QBCore.Functions.HasItem(item) then success = item return success else Notify('You Need ' .. QBCore.Shared.Items[item].label .. " !", 'error') end +end end function Email(sender, subject, message)