From c26879a7026615163e5e502e5be02f653a3b6971 Mon Sep 17 00:00:00 2001 From: BerkieBb <82737367+BerkieBb@users.noreply.github.com> Date: Thu, 30 Jun 2022 21:51:33 +0200 Subject: [PATCH] fix(server/functions): hasitem single item check --- server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/functions.lua b/server/functions.lua index 015fa19..fd42d2d 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -396,7 +396,7 @@ function QBCore.Functions.HasItem(source, items, amount) 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 return true end end