From 3a1adc897905e80240d907715741a91a883f6266 Mon Sep 17 00:00:00 2001 From: iSentrie Date: Sat, 9 Nov 2024 17:20:49 +0200 Subject: [PATCH] es_extended(server/main.lua): return if no weapon return if target has no weapon --- [core]/es_extended/server/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index 1b9c7522..57108b32 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -462,6 +462,7 @@ if not Config.CustomInventory then if not targetXPlayer.hasWeapon(itemName) then sourceXPlayer.showNotification(TranslateCap("gave_weapon_noweapon", targetXPlayer.name)) targetXPlayer.showNotification(TranslateCap("received_weapon_noweapon", sourceXPlayer.name, weapon.label)) + return end local _, weaponObject = ESX.GetWeapon(itemName) @@ -502,7 +503,8 @@ if not Config.CustomInventory then if itemCount == nil or itemCount < 1 then return xPlayer.showNotification(TranslateCap("imp_invalid_amount")) end - local account = xPlayer.getAccount(itemName) + + local account = xPlayer.getAccount(itemName) if itemCount > account.money or account.money < 1 then return xPlayer.showNotification(TranslateCap("imp_invalid_amount"))