Skip to content

Commit

Permalink
Merge pull request #1445 from iSentrie/patch-11
Browse files Browse the repository at this point in the history
fix(es_extended/server/main.lua): return if no weapon
  • Loading branch information
Mycroft-Studios authored Nov 10, 2024
2 parents 7e800eb + 3a1adc8 commit 62971c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion [core]/es_extended/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit 62971c3

Please sign in to comment.