mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-03 11:48:53 +00:00
refactor: more logical code
This commit is contained in:
@@ -103,7 +103,7 @@ function ESX.RegisterCommand(name, group, cb, allowConsole, suggestion)
|
||||
end
|
||||
end
|
||||
|
||||
if v.validate == false then
|
||||
if not v.validate then
|
||||
error = nil
|
||||
end
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ CreateThread(function()
|
||||
})
|
||||
|
||||
for k,v in pairs(OpenedMenus) do
|
||||
if v == true then
|
||||
if v then
|
||||
OpenedMenuCount = OpenedMenuCount + 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -95,7 +95,7 @@ if ESX.GetConfig().Multichar then
|
||||
end
|
||||
|
||||
SetupCharacter = function(index)
|
||||
if spawned == false then
|
||||
if not spawned then
|
||||
exports.spawnmanager:spawnPlayer({
|
||||
x = Config.Spawn.x,
|
||||
y = Config.Spawn.y,
|
||||
@@ -188,7 +188,7 @@ if ESX.GetConfig().Multichar then
|
||||
if not v.model and v.skin then
|
||||
if v.skin.model then v.model = v.skin.model elseif v.skin.sex == 1 then v.model = mp_f_freemode_01 else v.model = mp_m_freemode_01 end
|
||||
end
|
||||
if spawned == false then SetupCharacter(Character) end
|
||||
if not spawned then SetupCharacter(Character) end
|
||||
local label = v.firstname..' '..v.lastname
|
||||
if Characters[k].disabled then
|
||||
elements[#elements+1] = {title = label,icon = "fa-regular fa-user", value = v.id}
|
||||
@@ -318,7 +318,7 @@ if ESX.GetConfig().Multichar then
|
||||
|
||||
if Config.Relog then
|
||||
RegisterCommand('relog', function(source, args, rawCommand)
|
||||
if canRelog == true then
|
||||
if canRelog then
|
||||
canRelog = false
|
||||
TriggerServerEvent('esx_multicharacter:relog')
|
||||
ESX.SetTimeout(10000, function()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
if not ESX then
|
||||
error('\n^1Unable to start Multicharacter - you must be using ESX Legacy^0')
|
||||
elseif ESX.GetConfig().Multichar == true then
|
||||
elseif ESX.GetConfig().Multichar then
|
||||
local DATABASE do
|
||||
local connectionString = GetConvar('mysql_connection_string', '');
|
||||
if connectionString == '' then
|
||||
|
||||
Reference in New Issue
Block a user