Fix cash/bank showing as undefined with new ESX

This commit is contained in:
Henric Backman
2020-04-10 04:46:50 +02:00
committed by GitHub
parent ac96a70de3
commit 1fa58f645c
+3
View File
@@ -57,6 +57,9 @@ function GetPlayerCharacters(source)
for i = 1, #Chars, 1 do
charJob = MySQLAsyncExecute("SELECT * FROM `jobs` WHERE `name` = '"..Chars[i].job.."'")
charJobgrade = MySQLAsyncExecute("SELECT * FROM `job_grades` WHERE `grade` = '"..Chars[i].job_grade.."'")
local accounts = json.decode(Chars[1].accounts)
Chars[i].bank = accounts["bank"]
Chars[i].money = accounts["money"]
Chars[i].job = charJob[1].label
Chars[i].job_grade = charJobgrade[1].label
end