From 98353662d3344efe817141ffee6c6f339a6d5b8d Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sat, 5 May 2018 23:53:14 +0200 Subject: [PATCH] Fixed duplicate menu names --- client/main.lua | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/client/main.lua b/client/main.lua index e821b391..36195152 100644 --- a/client/main.lua +++ b/client/main.lua @@ -110,22 +110,20 @@ function OpenPropertyMenu() { title = _U('amount') }, - function(data2, menu) + function(data2, menu2) local amount = tonumber(data2.value) if amount == nil then ESX.ShowNotification(_U('invalid_amount')) else - - menu.close() - local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() if closestPlayer == -1 or closestDistance > 3.0 then ESX.ShowNotification(_U('no_play_near')) else TriggerServerEvent('esx_realestateagentjob:sell', GetPlayerServerId(closestPlayer), data.data.name, amount) + menu2.close() end OpenPropertyMenu() @@ -133,8 +131,8 @@ function OpenPropertyMenu() end end, - function(data2, menu) - menu.close() + function(data2, menu2) + menu2.close() end ) @@ -149,22 +147,20 @@ function OpenPropertyMenu() { title = _U('amount') }, - function(data2, menu) + function(data2, menu2) local amount = tonumber(data2.value) if amount == nil then ESX.ShowNotification(_U('invalid_amount')) else - - menu.close() - local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() if closestPlayer == -1 or closestDistance > 3.0 then ESX.ShowNotification(_U('no_play_near')) else TriggerServerEvent('esx_realestateagentjob:rent', GetPlayerServerId(closestPlayer), data.data.name, amount) + menu2.close() end OpenPropertyMenu() @@ -172,8 +168,8 @@ function OpenPropertyMenu() end end, - function(data2, menu) - menu.close() + function(data2, menu2) + menu2.close() end )