Studio PLAYERS
  • Studio PLAYERS
  • 📦QB/QBX SCRIPTS
    • 💸SA-MONEY
      • 💡Introduction
      • ⚙️Installation
        • ⚙️Installation
        • ⚙️Migration
        • ⚙️Add new currency
      • 🗃️Displays $ in inventory
      • 📚HUD Implementations
        • 📗17mov_Hud
        • 📗wais-hudv5
    • 💰SA-MONEYWASH
      • 💡Introduction
      • ⚙️Installation
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🧊SA-BOXE
      • 💡Introduction
      • 💡Usage
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 📦ESX SCRIPTS
    • 🕐SA-PLAYTIME
      • 💡Introduction
      • ⚙️Installation
      • ✈️Exports
    • ☠️SA-CHARACTERKILL
      • 💡Introduction
      • ⚙️Installation
    • 🚦SA-TRAFFICLIGHTSPRIORITY
      • 💡Introduction
      • ⚙️Installation
  • 🛠️FAQ
    • 🛠️General Issues
    • 🛠️SA-Money-V2
Powered by GitBook
On this page
  1. ESX SCRIPTS

SA-CHARACTERKILL

Script for RolePlay servers to kill player's character

Last updated 1 year ago

This script removes the player’s character from DB. Don’t worry this script works with CitizenID so it doesn’t remove his other characters if there are any.

In default is the command

/ck [ID/CID] [Player ID/CitizenID] | It removes the player’s character from DB. Whenever it doesn't matter if it is online or offline. /wipe | It wipes whole server

Configuration

You will find everything you need in config.lua

Language /locale/en.lua

To change notify system /server/functions.lua

Features

  • Resmon - 0.00ms

  • Configurable - locale/language, config (command)

  • 0 Threads

  • Easy-to-Configure!

We are using Asset Escrow system

📦
☠️
Page cover image
Preview
https://github.com/Studio-PLAYERS/TEBEX-Doc/blob/main/SA-Characterkill/previews/config.lua
Config = {

    Language = 'en',        -- Here you can change language. Translations are in folder locale

    Framework = 'qb-core',  -- qb-core/esx | Don't touch this. Change it only if you have renamed qb or you use ESX

    Debug = false,          -- Command for me to debug script. It print to console passes trough conditions. true/false

    Rights = 'admin',       -- Here you can set a rights for this command

    CharKill = "ck",        -- Name of command which will remove your character from database (Through ID Player/Citizen ID)  ------ (ck)



    -----------------------------------------------------------------



    Wipe = 'wipe', -- Removes all players 

    WipeRights = 'god', -- Rights for wipe command

    WipeSecureWord = 'NeverGonnaGiveYouUp', -- This word you have to use to confirm wipe /wipe NeverGonnaGiveYouUp



    -----------------------------------------------------------------



    -- This message shows up to players that was on server and they were kicked out due wipe

    WipeMessage = 'Server is currently wiping all of your hard gained stuff :Wink:. See ya after blackout.' ,



    -----------------------------------------------------------------

    VersionCheck = true,

}



Delete = {

    --------------------------------------

    --      QB-Core Database Tables     --

    --------------------------------------

    

    'players',                -- Remove Player from DB

    'playerskins',            -- Remove Player skins from DB

    'player_vehicles',        -- Remove Player vehicles from DB

    'player_outfits',         -- Remove Player outfits from DB

    'player_contacts',        -- Remove Player contacts from DB

    'player_houses',          -- Remove Player houses from DB

    'player_mails',           -- Remove Player mails from DB 

    'apartments',             -- Remove Player apartments from DB

    'bank_accounts',          -- Remove Player bank accounts from DB

    'bank_statements',        -- Remove Player bank statements from DB







    ----------------------------------

    --      ESX Database Tables     --

    ----------------------------------

    

    --[[ 'addon_account_data',

    'banking',

    'billing',

    'datastore_data',

    'owned_vehicles',

    'rented_vehicles',

    'society_moneywash',

    'users',

    'user_licenses',  ]]

    



    

    --To add own remove just follow format (Removes thanks to CitizenID if isn't CID in the table it wouldn't remove anything)

    --'name_of_the_DB'

}





--THIS FEATURE IS UNDER DEVELOPMENT

--[[ Item = { 

    enabled = true, --This option disables/enables players to do CK with the item with the authorization of the admin.

    Radius = 5.0, --Radius how far can people do a CK



    ----------------------------------------------------------------------------------------------------------------------

    ItemCreation = true, --This option disable the fuse. Disable it only if you are getting errors in console. (Older QB-Core)

    name = 'black_bag',

    label = 'Black Bag',

    weight = 0,

    type = 'item',

    image = 'blackbag.png',

    unique = false,

    useable = true,

    shouldClose = true,

    combinable = nil,

    description = 'Just a black bag, maybe for body? or rubbish :)',

    ----------------------------------------------------------------------------------------------------------------------

}

 ]]
https://github.com/Studio-PLAYERS/TEBEX-Doc/blob/main/SA-Characterkill/previews/en.lua
if Config.Language == 'en' then

    Translations = {

        notify = {

            notfound = "Player not found.",

            deleted = 'Character was successfully removed from server',

            InvalidFormat = 'This is invalid format.',

            WrongSecureWord = 'Wrong secure word',

        },

        utils = {

            descriptions = "Kill/Remove player character (Permanent)",

            IDPlayer = "ID (Player ID) / CID (Citizen ID) - QB Only",

            WriteIn = "Here write an ID or CitizenID (QB Only). Depends on what did you choose.",

            kickreason = 'You have been kicked because we are removing your character from server',

            SecretWord = 'Here write secret word Wink',

        },

    }

end
https://github.com/Studio-PLAYERS/TEBEX-Doc/blob/main/SA-Characterkill/previews/functions.lua
local function NotifySystem(src, text, typ)

    if ESX then

        -- ESX

        local xPlayer = ESX.GetPlayerFromId(src)

        if not xPlayer then return end

        xPlayer.showNotification(text) 

    else

        -- QB-Core

        TriggerClientEvent('QBCore:Notify', src, text, typ)

    end

end



function Notify(event, src)

    if event == 'NotFound' then

        NotifySystem(src, Translations.notify.notfound, 'error')

    elseif event == 'InvalidFormat' then

        NotifySystem(src, Translations.notify.InvalidFormat, 'error')

    elseif event == 'WrongSecureWord' then

        NotifySystem(src, Translations.notify.WrongSecureWord, 'error')

    elseif event == 'Deleted' then

        NotifySystem(src, Translations.notify.deleted, 'success')

    end

end