mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 01:38:52 +00:00
Merge pull request #557 from MaLaGeBe/patch-1
Fix give weapon ammo on esx:giveInventoryItem
This commit is contained in:
+2
-1
@@ -281,8 +281,9 @@ AddEventHandler('esx:giveInventoryItem', function(target, type, itemName, itemCo
|
||||
end
|
||||
elseif type == 'item_ammo' then
|
||||
if sourceXPlayer.hasWeapon(itemName) then
|
||||
local weaponNum, weapon = sourceXPlayer.getWeapon(itemName)
|
||||
|
||||
if targetXPlayer.hasWeapon(itemName) then
|
||||
local weaponNum, weapon = sourceXPlayer.getWeapon(itemName)
|
||||
local _, weaponObject = ESX.GetWeapon(itemName)
|
||||
|
||||
if weaponObject.ammo then
|
||||
|
||||
Reference in New Issue
Block a user