mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
Save accounts as encoded json text, migrate script found in development discord
This commit is contained in:
+1
-13
@@ -5,7 +5,6 @@ ESX.Items = {}
|
||||
ESX.ServerCallbacks = {}
|
||||
ESX.TimeoutCount = -1
|
||||
ESX.CancelledTimeouts = {}
|
||||
ESX.LastPlayerData = {}
|
||||
ESX.Pickups = {}
|
||||
ESX.PickupId = 0
|
||||
ESX.Jobs = {}
|
||||
@@ -58,17 +57,6 @@ MySQL.ready(function()
|
||||
print('[es_extended] [^2INFO^7] ESX developed by ESX-Org has been initialized')
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:playerLoaded', function(playerId)
|
||||
local xPlayer, accounts = ESX.GetPlayerFromId(playerId), {}
|
||||
local xPlayerAccounts = xPlayer.getAccounts()
|
||||
|
||||
for i=1, #xPlayerAccounts, 1 do
|
||||
accounts[xPlayerAccounts[i].name] = xPlayerAccounts[i].money
|
||||
end
|
||||
|
||||
ESX.LastPlayerData[playerId] = {accounts = accounts}
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx:clientLog')
|
||||
AddEventHandler('esx:clientLog', function(msg)
|
||||
if Config.EnableDebug then
|
||||
@@ -80,7 +68,7 @@ RegisterServerEvent('esx:triggerServerCallback')
|
||||
AddEventHandler('esx:triggerServerCallback', function(name, requestId, ...)
|
||||
local playerId = source
|
||||
|
||||
ESX.TriggerServerCallback(name, requestID, playerId, function(...)
|
||||
ESX.TriggerServerCallback(name, requestId, playerId, function(...)
|
||||
TriggerClientEvent('esx:serverCallback', playerId, requestId, ...)
|
||||
end, ...)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user