From 1436f7df573372dfc84651afbc32042c5b63a305 Mon Sep 17 00:00:00 2001 From: CeebDev Date: Sun, 12 May 2024 20:58:03 +0200 Subject: [PATCH] fix(client): notify can not perform (#1696) --- client.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/client.lua b/client.lua index d8bcbe3be..c67a8c138 100644 --- a/client.lua +++ b/client.lua @@ -651,15 +651,13 @@ local function useSlot(slot, noAnim) lib.notify({ id = 'component_invalid', type = 'error', description = locale('component_invalid', label) }) elseif data.allowArmed then useItem(data) + else + return lib.notify({ id = 'cannot_perform', type = 'error', description = locale('cannot_perform') }) end elseif not data.ammo and not data.component then useItem(data) end - end - - if currentWeapon then - return lib.notify({ id = 'cannot_perform', type = 'error', description = locale('cannot_perform') }) - end + end end exports('useSlot', useSlot)