From a3d611e584213bee5ac464a729606a37973cbe1b Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 23 Jun 2021 23:38:09 +1000 Subject: [PATCH 1/2] fix(server/main): Define default values for loadout and weight --- server/main.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/main.lua b/server/main.lua index 9ff09122..3ad62482 100644 --- a/server/main.lua +++ b/server/main.lua @@ -126,7 +126,9 @@ function loadESXPlayer(identifier, playerId, isNew) accounts = {}, inventory = {}, job = {}, + loadout = {}, playerName = GetPlayerName(playerId), + weight = 0 } table.insert(tasks, function(cb) From 2980fd21606c6a47bcbae853886ce3d71f143cef Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Thu, 24 Jun 2021 00:39:51 +1000 Subject: [PATCH 2/2] fix(server/functions): Corrected a typo in the savePlayers query --- server/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/functions.lua b/server/functions.lua index 3ff7af7f..e03d0dc2 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -165,7 +165,7 @@ end local savePlayers = -1 Citizen.CreateThread(function() - savePlayers = MySQL.Sync.store("UPDATE users SET `accounts` = ?, `job` = ?, `job_grade` = ?, `group` = ?, `position`= ?, `inventory`, = ?, `loadout` = ? WHERE `identifier` = ?") + savePlayers = MySQL.Sync.store("UPDATE users SET `accounts` = ?, `job` = ?, `job_grade` = ?, `group` = ?, `position` = ?, `inventory` = ?, `loadout` = ? WHERE `identifier` = ?") end) ESX.SavePlayer = function(xPlayer, cb)