mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
Update server/player.lua
Co-authored-by: David Malchin <malchin459@gmail.com>
This commit is contained in:
@@ -567,7 +567,11 @@ function QBCore.Player.ForceDeleteCharacter(citizenid)
|
||||
local query = "DELETE FROM %s WHERE citizenid = ?"
|
||||
local tableCount = #playertables
|
||||
local queries = table.create(tableCount, 0)
|
||||
local Player = QBCore.Functions.GetPlayerByCitizenId(citizenid)
|
||||
|
||||
if Player then
|
||||
DropPlayer(Player.PlayerData.source, "An admin deleted the character which you are currently using")
|
||||
end
|
||||
for i = 1, tableCount do
|
||||
local v = playertables[i]
|
||||
queries[i] = {query = query:format(v.table), values = { citizenid }}
|
||||
|
||||
Reference in New Issue
Block a user