mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 02:38:53 +00:00
Ask for saving outfit in dressing
This commit is contained in:
+33
-10
@@ -70,21 +70,44 @@ function OpenShopMenu()
|
||||
if foundStore then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'outfit_name',
|
||||
'default', GetCurrentResourceName(), 'save_dressing',
|
||||
{
|
||||
title = _U('name_outfit'),
|
||||
title = _U('save_in_dressing'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = _U('yes'), value = 'yes'},
|
||||
{label = _U('no'), value = 'no'},
|
||||
}
|
||||
},
|
||||
function(data, menu)
|
||||
function(data2, menu2)
|
||||
|
||||
menu.close()
|
||||
menu2.close()
|
||||
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
TriggerServerEvent('esx_clotheshop:saveOutfit', data.value, skin)
|
||||
end)
|
||||
if data2.current.value == 'yes' then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'outfit_name',
|
||||
{
|
||||
title = _U('name_outfit'),
|
||||
},
|
||||
function(data3, menu3)
|
||||
|
||||
menu3.close()
|
||||
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
TriggerServerEvent('esx_clotheshop:saveOutfit', data3.value, skin)
|
||||
end)
|
||||
|
||||
ESX.ShowNotification(_U('saved_outfit'))
|
||||
|
||||
end,
|
||||
function(data3, menu3)
|
||||
menu3.close()
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
end,
|
||||
function(data2,menu)
|
||||
menu.close()
|
||||
end
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user