tweak: use txAdmin locale by default

by default, use the txAdmin locale, unless a `esx:locale` is specified.
This allows people to change languages easier, since everything will be in the same place, and if they want to specify a different language for ESX, then they can do.

This also wont break anything, since it wont affect existing users whom will aready have the `esx:locale` set
This commit is contained in:
Kasey FItton
2024-10-15 14:52:37 +01:00
parent f29b2fc910
commit 2ebaa422ea
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -1,5 +1,9 @@
Config = {}
Config.Locale = GetConvar("esx:locale", "en")
local txAdminLocale = GetConvar("txAdmin-locale", "en")
local esxLocale = GetConvar("esx:locale", "none")
Config.Locale = esxLocale == "none" and txAdminLocale or esxLocale
Config.OxInventory = GetResourceState("ox_inventory") ~= 'missing'