mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 22:01:33 +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
|
||||
local src = existing.PlayerData.source
|
||||
-- clear refs to prevent playerDropped from saving
|
||||
QBCore.Players[src] = nil
|
||||
QBCore.Players[src] = nil
|
||||
QBCore.PlayersByCitizenId[citizenid] = nil
|
||||
DropPlayer(src, 'An admin deleted the character which you are currently using')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user