mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
fix(es_extended): kick the player when their data fails to load
This commit is contained in:
@@ -200,6 +200,11 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
|
||||
local result = MySQL.prepare.await(loadPlayer, { identifier })
|
||||
|
||||
if not result then
|
||||
print(("[^1ERROR^7] esx_core could not load data for identifier ^5%s^7"):format(identifier))
|
||||
return DropPlayer(playerId --[[@as string]], "There was an error loading your character!\nError code: data-load-failed\n\nYour character data could not be retrieved. Please reconnect, and contact the server administration team if this keeps happening.")
|
||||
end
|
||||
|
||||
-- Accounts
|
||||
local accounts = result.accounts
|
||||
accounts = (accounts and accounts ~= "") and json.decode(accounts) or {}
|
||||
|
||||
Reference in New Issue
Block a user