From a62890cc5669716b0b397f12e6b0aecabb3d5597 Mon Sep 17 00:00:00 2001 From: Satria Adhi Date: Sat, 16 May 2020 19:43:30 +0700 Subject: [PATCH] fix give_ammo, mistake from fixed #633 --- client/functions.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/client/functions.lua b/client/functions.lua index ae5e737e..e1f7ecd4 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -961,6 +961,7 @@ ESX.ShowInventory = function() ESX.ShowInventory() elseif data1.current.action == 'give_ammo' then local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + local closestPed = GetPlayerPed(closestPlayer) local pedAmmo = GetAmmoInPedWeapon(playerPed, GetHashKey(item)) if IsPedOnFoot(closestPed) and not IsPedFalling(closestPed) then