fix(status): Reference the correct table

This commit is contained in:
Linden
2021-06-30 02:31:27 +10:00
parent b931e33b63
commit c1d9fbed05
+2 -2
View File
@@ -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))