mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 00:01:22 +00:00
🐛 Fix async race condition causing ghost characters on deletion
This commit is contained in:
+1
-1
@@ -577,7 +577,7 @@ function QBCore.Player.ForceDeleteCharacter(citizenid)
|
|||||||
if existing then
|
if existing then
|
||||||
local src = existing.PlayerData.source
|
local src = existing.PlayerData.source
|
||||||
-- clear refs to prevent playerDropped from saving
|
-- clear refs to prevent playerDropped from saving
|
||||||
QBCore.Players[src] = nil
|
QBCore.Players[src] = nil
|
||||||
QBCore.PlayersByCitizenId[citizenid] = nil
|
QBCore.PlayersByCitizenId[citizenid] = nil
|
||||||
DropPlayer(src, 'An admin deleted the character which you are currently using')
|
DropPlayer(src, 'An admin deleted the character which you are currently using')
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user