mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 22:01:33 +00:00
Merge branch 'main' into main
This commit is contained in:
+5
-1
@@ -575,7 +575,11 @@ function QBCore.Player.ForceDeleteCharacter(citizenid)
|
|||||||
local queries = {}
|
local queries = {}
|
||||||
local existing = QBCore.Functions.GetPlayerByCitizenId(citizenid)
|
local existing = QBCore.Functions.GetPlayerByCitizenId(citizenid)
|
||||||
if existing then
|
if existing then
|
||||||
DropPlayer(existing.PlayerData.source, 'An admin deleted the character which you are currently using')
|
local src = existing.PlayerData.source
|
||||||
|
-- clear refs to prevent playerDropped from saving
|
||||||
|
QBCore.Players[src] = nil
|
||||||
|
QBCore.PlayersByCitizenId[citizenid] = nil
|
||||||
|
DropPlayer(src, 'An admin deleted the character which you are currently using')
|
||||||
end
|
end
|
||||||
for i = 1, #playertables do
|
for i = 1, #playertables do
|
||||||
queries[i] = { query = query:format(playertables[i].table), values = { citizenid } }
|
queries[i] = { query = query:format(playertables[i].table), values = { citizenid } }
|
||||||
|
|||||||
Reference in New Issue
Block a user