From 248b6e0b92664c40c8a2156770d1a8e688e4b2ad Mon Sep 17 00:00:00 2001 From: Demetrio <15928886+d3rp-jsx@users.noreply.github.com> Date: Mon, 9 Aug 2021 16:54:32 +0200 Subject: [PATCH] improvement: configurable character deletation (#35) Co-authored-by: d3rp-jsx <15928886+derp-jsx@users.noreply.github.com> --- client/main.lua | 2 +- config.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 87dccc3e..28e33a4d 100644 --- a/client/main.lua +++ b/client/main.lua @@ -190,7 +190,7 @@ if ESX.GetConfig().Multichar then local elements = {} if not data.current.new then elements[1] = {label = _('char_play'), action = 'play', value = data.current.value} - elements[2] = {label = _('char_delete'), action = 'delete', value = data.current.value} + if Config.CanDelete then elements[2] = {label = _('char_delete'), action = 'delete', value = data.current.value} end ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'choosechar', { title = _('select_char'), align = 'top-left', diff --git a/config.lua b/config.lua index 0dff5211..f1874abf 100644 --- a/config.lua +++ b/config.lua @@ -5,6 +5,8 @@ Config.Slots = 4 Config.Spawn = vector4(-113.7, 565.3, 195.2, 0) -- Sets the location for character selection -- To set the spawn location for new characters, modify the default value in the `users` SQL table +Config.CanDelete = false -- Choose whether or not a user can self-delete its own characters + -------------------- -- Do not use unless you are prepared to adjust your resources to correctly reset data -- Information: https://github.com/thelindat/esx_multicharacter#relogging