From c1d9fbed0556a6be76b384a496da3338ab4822e7 Mon Sep 17 00:00:00 2001 From: Linden Date: Wed, 30 Jun 2021 02:31:27 +1000 Subject: [PATCH] fix(status): Reference the correct table --- [esx_addons]/esx_status/server/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/[esx_addons]/esx_status/server/main.lua b/[esx_addons]/esx_status/server/main.lua index ccb33b18..2eea220b 100644 --- a/[esx_addons]/esx_status/server/main.lua +++ b/[esx_addons]/esx_status/server/main.lua @@ -10,8 +10,8 @@ AddEventHandler('onResourceStart', function(resourceName) else MySQL.Async.fetchAll('SELECT status FROM users WHERE identifier = @identifier', { ['@identifier'] = xPlayer.identifier - local data = {} }, function(result) + local data = {} if result[1].status then data = json.decode(result[1].status) @@ -101,7 +101,7 @@ function SaveData() local xPlayers = ESX.GetExtendedPlayers() for _, xPlayer in pairs(xPlayers) do - local status = Status[xPlayer.source] + local status = ESX.Players[xPlayer.source] whenList = whenList .. string.format('when identifier = \'%s\' then \'%s\' ', xPlayer.identifier, json.encode(status))