CodeWorkers.io BanSystem Configuration Guide

Thank you for choosing CodeWorkers.io BanSystem! We're excited to see how it elevates your system. We hope you like it!

Overview

The CodeWorkers.io BanSystem provides a comprehensive solution for managing bans and player restrictions on your server. This guide will walk you through the configuration process and usage of the BanSystem.

Features

Getting Started

Prerequisites

Installation

  1. Download: Download the BanSystem from CFX.re Keymaster
  2. Configure: Customize the Config files according to your server's requirements.
  3. Craft Your Custom Adaptive Card: Visit Adaptive Cards Designer to create a personalized Adaptive Card tailored for your system. Configure your host app, such as Microsoft Teams Version 1.5, and use Darkmode for the best configuration.
  4. Integrate Your Card's JSON Code: Once you've designed your card, copy the generated JSON code. Open the ConnectCard.json file and ensure not to remove the existing brackets [] - simply paste your created code between these brackets.

Configuration

The config_sv.lua file contains the primary configuration parameters for the BanSystem and is not accessible from the client.


BanSystem.Config.ConnectCardAllowed = false

BanSystem.Config.GroupACE = 'command.cw_bansystem'

BanSystem.Config.PasswordCardAllowed = false
BanSystem.Config.Password = ''

BanSystem.Config.BanIDPrefix = 'CW-'
BanSystem.Config.BanIDLength = 5

BanSystem.Config.DiscordLogURL = ''
            

The config_sh.lua file contains various configuration parameters for the BanSystem.


Config = {
    BanCommand = 'ban',
    BanCommandInfo = "[ID]",

    UnbanCommand = 'unban',
    UnbanCommandInfo = "[BanID]",

    TempBanCommand = 'tempban',
    TempBanCommandInfo = "[ID] [HOURS]",

    DiscordLogName = 'CodeWorkers.io | BanSystem Logs',
    DiscordLogFooter = "CodeWorkers.io [TOOLS]",

    DiscordURL = "",
},

Language = {
    Infomation = "Information",
    Password = "Password",

    ConnectionError = "Something is not right with your connection!",

    PermissionError = "You cannot use this function",

    Usage = "Usage:",

    WrongID = "Invalid player ID.",
    WrongBanID = "Invalid ban ID.",
    WrongIDorTime = "Invalid player ID or duration.",

    PlayerBanHour = "Player has been banned for %s hour.",
    PlayerBanHours = "Player has been banned for %s hours.",

    YourBannedHour = "You have been banned for %s hour.",
    YourBannedHours = "You have been banned for %s hours.",

    YourBanned = "You have been banned.",
    PlayerBan = "Player successfully banned!",
    PlayerBanError = "Error banning player.",

    PlayerUnban = "Player successfully unbanned!",
    PlayerUnbanError = "Error lifting player's ban.",

    Loading = "Please wait, your connection is being checked...",

    BanInfoText = "You are banned!\nBan ID: ",
    BanTimeText = "\nRemaining time: %02d:%02d:%02d",

    LicenseError = "FiveM error. Please restart FiveM!",
    DiscordError = "No Discord ID found. Please start Discord and reconnect!",
    SteamError = "No Steam ID found. Please start Steam and restart FiveM!",

    WrongPassword = "Error: Invalid password entered!",
    OnlyAttempts = "Error: Invalid password entered! (%s attempts remaining!)",
    MaximumAttempts = "You've exceeded the maximum attempts. Please try again later.",

    DiscordLogKick = "Player kicked ID: ",
    DiscordLogBan = "A player has been banned",
    DiscordLogUnban = "A player has been unbanned",
    DiscordLogTempBan = "A player has been temporarily banned",
    DiscordLogTempHours = "Hours: "
},

-- Notification function for server-side admin commands, prints a message
Notify = function(msg)
    print(msg)  -- Prints the message on the client console and in their chat
end
            

Export Usage

The following export functions are available for usage:

            
exports.CW_BanSystem:AddBAN('license123', 'steam:123456789', 'discord:123456789012345678')
exports.CW_BanSystem:RemoveBAN('CW-ABCDE')
exports.CW_BanSystem:AddBANTime('license123', 'steam:123456789', 'discord:123456789012345678', 24)
exports.CW_BanSystem:ByePlayer('player123', 'Hacking')
local identifiers = exports.CW_BanSystem:CheckIDS(source)
local identifiers = {
    steamid = nil,
    license = nil,
    discord = nil,
    xbl = nil,
    liveid = nil,
    ip = nil
}
        

Support

If you require further assistance or have any queries, please don't hesitate to reach out. We hope you find using CodeWorkers.io BanSystem a delightful experience!