mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 01:38:52 +00:00
Implemented cancel event confirmation, closes #5
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
|
||||
description 'ESX Skin'
|
||||
|
||||
version '1.0.2'
|
||||
version '1.1.0'
|
||||
|
||||
server_scripts {
|
||||
'@mysql-async/lib/MySQL.lua',
|
||||
|
||||
+21
-30
@@ -101,22 +101,27 @@ function OpenMenu(submitCb, cancelCb, restrict)
|
||||
|
||||
submitCb(data, menu)
|
||||
DeleteSkinCam()
|
||||
end,
|
||||
function(data, menu)
|
||||
|
||||
menu.close()
|
||||
|
||||
DeleteSkinCam()
|
||||
|
||||
TriggerEvent('skinchanger:loadSkin', LastSkin)
|
||||
|
||||
if cancelCb ~= nil then
|
||||
cancelCb(data, menu)
|
||||
end
|
||||
|
||||
end,
|
||||
function(data, menu)
|
||||
end, function(data, menu)
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'confirm_escape', {
|
||||
title = _U('confirm_escape'),
|
||||
align = 'bottom-right',
|
||||
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)
|
||||
|
||||
if cancelCb ~= nil then
|
||||
cancelCb(data, menu)
|
||||
end
|
||||
end,function(data, menu)
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
|
||||
zoomOffset = data.current.zoomOffset
|
||||
@@ -345,18 +350,4 @@ AddEventHandler('esx_skin:requestSaveSkin', function()
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
TriggerServerEvent('esx_skin:responseSaveSkin', skin)
|
||||
end)
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
|
||||
Citizen.Wait(0)
|
||||
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
|
||||
if IsEntityDead(playerPed) then
|
||||
HasLoadedModel = false
|
||||
end
|
||||
|
||||
end
|
||||
end)
|
||||
end)
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
Locales['br'] = {
|
||||
|
||||
['skin_menu'] = 'Skin Menu',
|
||||
['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',
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
Locales['de'] = {
|
||||
|
||||
['skin_menu'] = 'Skin Menü',
|
||||
['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',
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
Locales['en'] = {
|
||||
|
||||
['skin_menu'] = 'Skin Menu',
|
||||
['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',
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
Locales['fi'] = {
|
||||
|
||||
['skin_menu'] = 'ulkonäkö',
|
||||
['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',
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
Locales['fr'] = {
|
||||
|
||||
['skin_menu'] = 'Skin Menu',
|
||||
['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',
|
||||
}
|
||||
|
||||
@@ -3,4 +3,7 @@ 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',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user