From dadcb6ebfb69751a9866889bf3a6933a9b776a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=20Gerg=C5=91?= <69343477+Rav3n95@users.noreply.github.com> Date: Tue, 31 Jan 2023 14:00:41 +0100 Subject: [PATCH 1/2] Quick fix (#873) Co-authored-by: TheFantomas <117121911+TheFantomas@users.noreply.github.com> --- [core]/es_extended/server/common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/server/common.lua b/[core]/es_extended/server/common.lua index 6aaf87c8..3e4b9671 100644 --- a/[core]/es_extended/server/common.lua +++ b/[core]/es_extended/server/common.lua @@ -94,7 +94,7 @@ MySQL.ready(function() ESX.Jobs = Jobs end - print('[^2INFO^7] ESX ^5Legacy 1.9.0^0 initialized!') + print('[^2INFO^7] ESX ^5Legacy 1.9.1^0 initialized!') StartDBSync() StartPayCheck() end) From 06c45f928ec948d81e39c090960a1c70ef08872e Mon Sep 17 00:00:00 2001 From: Naifen || Developer Date: Fri, 3 Feb 2023 14:40:15 +0100 Subject: [PATCH 2/2] Update(DefaultSpawn): Easier now --- [SQL]/legacy.sql | 2 +- [core]/es_extended/config.lua | 2 ++ [core]/es_extended/server/main.lua | 7 +------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[SQL]/legacy.sql b/[SQL]/legacy.sql index 2ba76874..36eeceb6 100644 --- a/[SQL]/legacy.sql +++ b/[SQL]/legacy.sql @@ -389,7 +389,7 @@ CREATE TABLE `users` ( `job` varchar(20) DEFAULT 'unemployed', `job_grade` int(11) DEFAULT 0, `loadout` longtext DEFAULT NULL, - `position` varchar(255) DEFAULT '{"x":-269.4,"y":-955.3,"z":31.2,"heading":205.8}', + `position` longtext NOT NULL, `firstname` varchar(16) DEFAULT NULL, `lastname` varchar(16) DEFAULT NULL, `dateofbirth` varchar(10) DEFAULT NULL, diff --git a/[core]/es_extended/config.lua b/[core]/es_extended/config.lua index 2f465f82..ea043be2 100644 --- a/[core]/es_extended/config.lua +++ b/[core]/es_extended/config.lua @@ -18,6 +18,8 @@ Config.Accounts = { Config.StartingAccountMoney = {bank = 50000} +Config.DefaultSpawn = {x = -269.4, y = -955.3, z = 31.2, heading = 205.8} + Config.EnableSocietyPayouts = false -- pay from the society account that the player is employed at? Requirement: esx_society Config.MaxWeight = 24 -- the max inventory weight without backpack Config.PaycheckInterval = 7 * 60000 -- how often to recieve pay checks in milliseconds diff --git a/[core]/es_extended/server/main.lua b/[core]/es_extended/server/main.lua index 8b4c00d3..1628fb13 100644 --- a/[core]/es_extended/server/main.lua +++ b/[core]/es_extended/server/main.lua @@ -243,12 +243,7 @@ function loadESXPlayer(identifier, playerId, isNew) end -- Position - if result.position and result.position ~= '' then - userData.coords = json.decode(result.position) - else - print('[^3WARNING^7] Column ^5"position"^0 in ^5"users"^0 table is missing required default value. Using backup coords, fix your database.') - userData.coords = {x = -269.4, y = -955.3, z = 31.2, heading = 205.8} - end + userData.coords = json.decode(result.position) or Config.DefaultSpawn -- Skin if result.skin and result.skin ~= '' then