mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Use new boss menu
This commit is contained in:
+5
-79
@@ -35,9 +35,7 @@ function OpenRealestateAgentMenu()
|
||||
}
|
||||
|
||||
if PlayerData.job ~= nil and PlayerData.job.name == 'realestateagent' and PlayerData.job.grade_name == 'boss' then
|
||||
table.insert(elements, {label = _U('remove_comp_money'), value = 'withdraw_society_money'})
|
||||
table.insert(elements, {label = _U('dep_money'), value = 'deposit_money'})
|
||||
table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
|
||||
table.insert(elements, {label = 'Action Patron', value = 'boss_actions'})
|
||||
end
|
||||
|
||||
ESX.UI.Menu.CloseAll()
|
||||
@@ -58,82 +56,10 @@ function OpenRealestateAgentMenu()
|
||||
OpenCustomersMenu()
|
||||
end
|
||||
|
||||
if data.current.value == 'withdraw_society_money' then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'withdraw_society_money_amount',
|
||||
{
|
||||
title = _U('amount_withdraw')
|
||||
},
|
||||
function(data, menu)
|
||||
|
||||
local amount = tonumber(data.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(_U('invalid_amount'))
|
||||
else
|
||||
menu.close()
|
||||
TriggerServerEvent('esx_society:withdrawMoney', 'realestateagent', amount)
|
||||
end
|
||||
|
||||
end,
|
||||
function(data, menu)
|
||||
menu.close()
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
if data.current.value == 'deposit_money' then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'deposit_money_amount',
|
||||
{
|
||||
title = _('amount_deposit')
|
||||
},
|
||||
function(data, menu)
|
||||
|
||||
local amount = tonumber(data.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(_U('invalid_amount'))
|
||||
else
|
||||
menu.close()
|
||||
TriggerServerEvent('esx_society:depositMoney', 'realestateagent', amount)
|
||||
end
|
||||
|
||||
end,
|
||||
function(data, menu)
|
||||
menu.close()
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
if data.current.value == 'wash_money' then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'wash_money_amount',
|
||||
{
|
||||
title = _U('amount_launder')
|
||||
},
|
||||
function(data, menu)
|
||||
|
||||
local amount = tonumber(data.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(_U('invalid_amount'))
|
||||
else
|
||||
menu.close()
|
||||
TriggerServerEvent('esx_society:washMoney', 'realestateagent', amount)
|
||||
end
|
||||
|
||||
end,
|
||||
function(data, menu)
|
||||
menu.close()
|
||||
end
|
||||
)
|
||||
|
||||
if data.current.value == 'boss_actions' then
|
||||
TriggerEvent('esx_society:openBossMenu', 'realestateagent', function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user