🐛 Fix async race condition causing ghost characters on deletion

This commit is contained in:
Mehdi
2026-05-29 12:17:00 +01:00
committed by GitHub
parent 02ce867a37
commit 1b126f1bd0
+1 -1
View File
@@ -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