mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Use new boss menu
This commit is contained in:
+5
-52
@@ -292,8 +292,7 @@ function OpenAmbulanceActionsMenu()
|
||||
}
|
||||
|
||||
if Config.EnablePlayerManagement and PlayerData.job.grade_name == 'boss' then
|
||||
table.insert(elements, {label = _U('withdraw_society'), value = 'withdraw_society_money'})
|
||||
table.insert(elements, {label = _U('deposit_society'), value = 'deposit_society_money'})
|
||||
table.insert(elements, {label = 'Action Patron', value = 'boss_actions'})
|
||||
end
|
||||
|
||||
ESX.UI.Menu.CloseAll()
|
||||
@@ -310,56 +309,10 @@ function OpenAmbulanceActionsMenu()
|
||||
OpenCloakroomMenu()
|
||||
end
|
||||
|
||||
if data.current.value == 'withdraw_society_money' then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'withdraw_society_money_amount',
|
||||
{
|
||||
title = _U('money_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', 'ambulance', amount)
|
||||
end
|
||||
|
||||
end,
|
||||
function(data, menu)
|
||||
menu.close()
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
if data.current.value == 'deposit_society_money' then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'deposit_money_amount',
|
||||
{
|
||||
title = _U('deposit_amount')
|
||||
},
|
||||
function(data, menu)
|
||||
|
||||
local amount = tonumber(data.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(_U('invalid_amount'))
|
||||
else
|
||||
menu.close()
|
||||
TriggerServerEvent('esx_society:depositMoney', 'ambulance', amount)
|
||||
end
|
||||
|
||||
end,
|
||||
function(data, menu)
|
||||
menu.close()
|
||||
end
|
||||
)
|
||||
|
||||
if data.current.value == 'boss_actions' then
|
||||
TriggerEvent('esx_society:openBossMenu', 'ambulance', function(data, menu)
|
||||
menu.close()
|
||||
end, {wash = false})
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user