Giter Club home page Giter Club logo

costa_characterkill's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.