Skip to content

Commit 9a543d9

Browse files
committed
Update player.lua
Updated player.lua to only include default QBCore tables for the character deletion.
1 parent c62dcff commit 9a543d9

File tree

1 file changed

+8
-22
lines changed

1 file changed

+8
-22
lines changed

server/player.lua

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -530,39 +530,25 @@ end
530530
-- Delete character
531531

532532
local playertables = { -- Add tables as needed
533-
---
534533
--- 'table' is the new SQL table name
535534
--- 'key' is the column name which contains the 'citizenid'
536-
---
537-
--Tables where primary key = 'citizenid'
535+
536+
-- Tables where primary key = 'citizenid'
538537
{ table = 'players', key = 'citizenid' },
539538
{ table = 'apartments', key = 'citizenid' },
540539
{ table = 'bank_accounts', key = 'citizenid' },
541-
{ table = 'bank_statements', key = 'citizenid' },
542540
{ table = 'crypto_transactions', key = 'citizenid' },
543541
{ table = 'player_houses', key = 'citizenid' },
544542
{ table = 'player_outfits', key = 'citizenid' },
545543
{ table = 'player_vehicles', key = 'citizenid' },
546544
{ table = 'playerskins', key = 'citizenid' },
545+
{ table = 'phone_invoices', key = 'citizenid' },
546+
{ table = 'phone_messages', key = 'citizenid' },
547+
{ table = 'player_contacts', key = 'citizenid' },
547548

548-
--Tables where primary key = 'cid'
549-
{ table = 'phone_invoices', key = 'cid' },
550-
{ table = 'phone_messages', key = 'cid' },
551-
552-
--Tables where primary key = 'identifier'
553-
{ table = 'player_contacts', key = 'identifier' },
554-
{ table = 'bank_cards', key = 'identifier' },
555-
{ table = 'bank_history', key = 'identifier' },
556-
{ table = 'casino_players', key = 'identifier' },
557-
{ table = 'cd_garage_privategarage', key = 'identifier' },
558-
{ table = 'inventory_clothes', key = 'identifier' },
559-
{ table = 'lation_detecting', key = 'identifier' },
560-
{ table = 'm_hunting', key = 'identifier' },
561-
562-
--Tables with other citizenid labels
563-
{ table = 'bank_process', key = 'owner' },
564-
{ table = 'mail_accounts', key = 'owner' },
565-
{ table = 'lation_chopshop', key = 'player_identifier' },
549+
---
550+
--- Tables where primary key is not 'citizenid'
551+
--- Example: { table = 'TABLE_NAME', key = 'CITIZEN_IDENTIFIER' },
566552
}
567553

568554
function QBCore.Player.DeleteCharacter(source, citizenid)

0 commit comments

Comments
 (0)