Added ESX.Table.Set() function and fixed accounts not loading

http://www.lua.org/pil/11.5.html
This commit is contained in:
ElPumpo
2019-11-16 17:41:41 +01:00
parent aa1ad0a1e8
commit c7a30efdd1
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -27,8 +27,9 @@ AddEventHandler('es:playerLoaded', function(source, _player)
MySQL.Async.fetchAll('SELECT name, money FROM user_accounts WHERE identifier = @identifier', {
['@identifier'] = player.getIdentifier()
}, function(accounts)
local validAccounts = ESX.Table.Set(Config.Accounts)
for k,v in ipairs(accounts) do
if Config.Accounts[v.name] then
if validAccounts[v.name] then
table.insert(userData.accounts, {
name = v.name,
money = v.money,