Skip to content

This script allows the specified users to delete a character from the database, thus performing a "Character Kill" for roleplay servers. Requires ESX.

License

Notifications You must be signed in to change notification settings

ItsGrard/costa_characterKill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CharacterKill

This script allows the specified users to delete a character from the database, thus performing a "Character Kill" for roleplay servers. Requires ESX.

How does it work

Valid players will be able to use CK command as well as CKStatus command. If FullCharDelete is set to true, it'll delete everything about the player in the database. You need to customize this portion of the code, more about this below. If FullCharDelete is set to false, it'll delete only that player's identity, these being the name, lastname, DOB, height and skin. In Config.lua you have to add your rockstar license, add as many licenses as you want separated by commas, just like in the example.

You must change the databases values in server.cfg to your own databases, you can add new tables or delete existing ones, just copy and paste this code inside deleteIdentityFromDatabase:

MySQL.Async.execute('DELETE FROM TABLENAME WHERE IDE = @ide',{
                ['@ide'] = identifier
            })

Change TABLENAME with the name of the table you want to delete it from. Change IDE with the name of the column the identifier is stored into, for example "owner" or "id", look it up in your table structure.

Commands

  • CK [NUMBER]: Performs a CK on that player ID (Eg:CK 2), this player must be online at the time. He'll be kicked out of the server with a message configurable in locale.
  • CKStatus: Shows the user whether it is set to completely erase the player or just its identity.

How to install it?

Just as any other FiveM resource;

  • Download it as .zip:
    • If you do so, unzip it anywhere inside a folder, then copy that folder into your resources folder and add start NAME to your server.cfg file, where NAME is the name of the folder you unzipped everything in.
  • Clone it to your server:
    • If you choose this option is because you understand how this works.

About

This script allows the specified users to delete a character from the database, thus performing a "Character Kill" for roleplay servers. Requires ESX.

Topics

Resources

License

Stars

Watchers

Forks

Languages