diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index 96c5cc64..3bed50ec 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -474,6 +474,9 @@ if not Config.CustomInventory then local weaponComponents = ESX.Table.Clone(weapon.components) local weaponTint = weapon.tintIndex + sourceXPlayer.removeWeapon(itemName) + targetXPlayer.addWeapon(itemName, itemCount) + if weaponTint then targetXPlayer.setWeaponTint(itemName, weaponTint) end @@ -484,9 +487,6 @@ if not Config.CustomInventory then end end - sourceXPlayer.removeWeapon(itemName) - targetXPlayer.addWeapon(itemName, itemCount) - if weaponObject.ammo and itemCount > 0 then local ammoLabel = weaponObject.ammo.label sourceXPlayer.showNotification(TranslateCap("gave_weapon_withammo", weaponLabel, itemCount, ammoLabel, targetXPlayer.name))