diff --git a/client/main.lua b/client/main.lua index de8bee5b..eb5fa08c 100644 --- a/client/main.lua +++ b/client/main.lua @@ -65,7 +65,7 @@ function OpenMenu(submitCb, cancelCb, restrict) local componentId = _components[i].componentId if componentId == 0 then - value = GetPedPropIndex(playerPed, _components[i].componentId) + value = GetPedPropIndex(playerPed, _components[i].componentId) end local data = { @@ -94,11 +94,10 @@ function OpenMenu(submitCb, cancelCb, restrict) camOffset = _components[1].camOffset ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'skin', { - title = _U('skin_menu'), - align = 'top-left', + title = _U('skin_menu'), + align = 'top-left', elements = elements }, function(data, menu) - TriggerEvent('skinchanger:getSkin', function(skin) LastSkin = skin end) @@ -106,22 +105,9 @@ function OpenMenu(submitCb, cancelCb, restrict) submitCb(data, menu) DeleteSkinCam() end, function(data, menu) - ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'confirm_escape', { - title = _U('confirm_escape'), - align = 'top-left', - elements = { - {label = _U('no'), value = 'no'}, - {label = _U('yes'), value = 'yes'} - } - }, function(data2, menu2) - if data2.current.value == 'yes' then - menu.close() - DeleteSkinCam() - TriggerEvent('skinchanger:loadSkin', LastSkin) - end - - menu2.close() - end) + menu.close() + DeleteSkinCam() + TriggerEvent('skinchanger:loadSkin', LastSkin) if cancelCb ~= nil then cancelCb(data, menu) @@ -272,6 +258,7 @@ function OpenSaveableMenu(submitCb, cancelCb, restrict) TriggerEvent('skinchanger:getSkin', function(skin) TriggerServerEvent('esx_skin:save', skin) + if submitCb ~= nil then submitCb(data, menu) end diff --git a/locales/br.lua b/locales/br.lua index 52eb7d1c..2a9d09d4 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -3,7 +3,4 @@ Locales['br'] = { ['use_rotate_view'] = 'Use ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ e ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ para girar a visão.', ['skin'] = 'Trocar', ['saveskin'] = 'Salvar', - ['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.', - ['no'] = 'no', - ['yes'] = 'yes', } diff --git a/locales/de.lua b/locales/de.lua index 25bc1c4f..f1439358 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -3,7 +3,4 @@ Locales['de'] = { ['use_rotate_view'] = 'benutze ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ und ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ um die Sicht zu drehen.', ['skin'] = 'Skin ändern', ['saveskin'] = 'Skin speichern', - ['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.', - ['no'] = 'no', - ['yes'] = 'yes', } diff --git a/locales/en.lua b/locales/en.lua index 1fb10930..f1ee073e 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -3,7 +3,4 @@ Locales['en'] = { ['use_rotate_view'] = 'use ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ and ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ to rotate the view.', ['skin'] = 'change skin', ['saveskin'] = 'save skin to a file', - ['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.', - ['no'] = 'no', - ['yes'] = 'yes', } diff --git a/locales/fi.lua b/locales/fi.lua index 1ea163a5..39e6d75f 100644 --- a/locales/fi.lua +++ b/locales/fi.lua @@ -3,7 +3,4 @@ Locales['fi'] = { ['use_rotate_view'] = 'paina ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ tai ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ liikutaaksesi kameraa.', ['skin'] = 'vaihda ulkonäköä', ['saveskin'] = 'talleta ulkonäkö tiedostoon', - ['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.', - ['no'] = 'no', - ['yes'] = 'yes', } diff --git a/locales/fr.lua b/locales/fr.lua index c71b7723..22cfc7bc 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -3,7 +3,4 @@ Locales['fr'] = { ['use_rotate_view'] = 'utilisez ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ et ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ pour tourner la vue.', ['skin'] = 'changer de skin', ['saveskin'] = 'sauvegarder skin dans un fichier', - ['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.', - ['no'] = 'no', - ['yes'] = 'yes', } diff --git a/locales/pl.lua b/locales/pl.lua index 173fad3e..3961df62 100644 --- a/locales/pl.lua +++ b/locales/pl.lua @@ -3,7 +3,4 @@ Locales['pl'] = { ['use_rotate_view'] = 'użyj ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ i ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ aby obrócić ekran.', ['skin'] = 'zmien wygląd', ['saveskin'] = 'zapisz wygląd do pliku', - ['confirm_escape'] = 'czy chcesz anulować zmianę wyglądu? Wszystkie zmiany zostaną utracone.', - ['no'] = 'nie', - ['yes'] = 'tak', } diff --git a/locales/sv.lua b/locales/sv.lua index 8f3dfcf8..02ddd5f0 100644 --- a/locales/sv.lua +++ b/locales/sv.lua @@ -3,7 +3,4 @@ Locales['sv'] = { ['use_rotate_view'] = 'använd ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ och ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ för att rotera.', ['skin'] = 'ändra skin', ['saveskin'] = 'spara skin till fil', - ['confirm_escape'] = 'vill du avbryta menyn? Alla ändringar går osparade.', - ['no'] = 'nej', - ['yes'] = 'ja', }