add menu.close()

This commit is contained in:
Jérémie N'gadi
2017-08-13 00:20:57 +02:00
parent 7b3963d67a
commit 031030adbe
2 changed files with 4 additions and 2 deletions
@@ -940,7 +940,10 @@ ESX.ShowInventory = function()
elseif data.current.action == 'remove' then
if type == 'item_weapon' then
TriggerServerEvent('esx:removeInventoryItem', type, item, 1)
menu.close()
else
ESX.UI.Menu.Open(
@@ -479,8 +479,7 @@ AddEventHandler('esx:removeInventoryItem', function(type, itemName, itemCount)
elseif type == 'item_weapon' then
local xPlayer = ESX.GetPlayerFromId(source)
local xPlayer = ESX.GetPlayerFromId(source)
local weaponLabel = itemName
local weaponName = nil
local weaponPickup = nil