Player Stats

⭐ This plugin is private! Can be purchased on our Discord Marketplace.

It is used to display player statistics from any CSS or Metamod plugin that stores player stats in a MySQL database (Players do not need to be connected on the CS2 server). You can view these statistics on the Discord server using the Slash command or by clicking the button under Server Status / Server Status Plus / Reports. You can fetch statistics from all your servers, so if you have multiple servers with stats stored in different databases, you can choose which server's stats to display when using the Slash Command.

The plugin includes extensive configuration options where you can adjust and set which database tables to pull data from, which columns to store, search by player Names or SteamIDs, customize response messages, and much more.

⚠️You only need to have this plugin installed on one server! Do not upload this plugin to multiple servers if you use the same BOT on each server!

Config Preview
{
  "Discord Command Data": {
    "Command Name": "stats",
    "Command Description": "Display player statistics",
    "Server Option Name": "server",
    "Server Option Description": "Which server to take statistics from",
    "Value Option Name": "name",
    "Value Option Description": "Name of player"
  },
  "Servers List": {
    "Public": {
      "Database": {
        "Host": "",
        "Port": 3306,
        "User": "",
        "Database": "",
        "Password": ""
      },
      "SearchType": 1,
      "Tables": {
        "k4ranks": {
          "SteamIdColumn": "steam_id",
          "NameColumn": "name"
        },
        "k4stats": {
          "SteamIdColumn": "steam_id",
          "NameColumn": "name"
        }
      },
      "StoredData": [
        "steam_id",
        "name",
        "rank",
        "points",
        "kills",
        "deaths",
        "assists",
        "lastseen"
      ]
    },
    "Only Mirage": {
      "Database": {
        "Host": "",
        "Port": 3306,
        "User": "",
        "Database": "",
        "Password": ""
      },
      "SearchType": 1,
      "Tables": {
        "k4ranks": {
          "SteamIdColumn": "steam_id",
          "NameColumn": "name"
        },
        "k4stats": {
          "SteamIdColumn": "steam_id",
          "NameColumn": "name"
        }
      },
      "StoredData": [
        "steam_id",
        "name",
        "rank",
        "points",
        "kills",
        "deaths",
        "assists",
        "lastseen"
      ]
    }
  },
  "Response Embeds": {
    "Stats Found": {
      "Silent Response": true,
      "Content": "",
      "Title": "Statistics of player {name}",
      "Description": "\u003E \uD83C\uDF96\uFE0F Rank: \u0060{rank}\u0060 (\u0060{points}\u0060 Points)\n\u003E \uD83D\uDCC5 Last connection: \u0060{lastseen}\u0060\n ",
      "Fields": "Kills;{kills};true|Deaths;{deaths};true|Assists;{assists};true",
      "Thumbnail": "",
      "Image": "",
      "HEX Color": "#00ccff",
      "Footer": "",
      "Footer Timestamp": false
    },
    "Multiple Matches Found": {
      "Silent Response": true,
      "Content": "",
      "Title": "",
      "Description": "\u003E More results were found for \u0060{VALUE}\u0060 value on server \u0060{SERVER}\u0060!\n\n\u003E \u2B07\uFE0F Select a player from the list below \u2B07\uFE0F",
      "Fields": "",
      "Thumbnail": "",
      "Image": "",
      "HEX Color": "#ff00ff",
      "Footer": "",
      "Footer Timestamp": false,
      "Stats Found": {
        "Select Menu Name": "Select a player",
        "Select Menu Format": "{name}",
        "Select Menu Description Format": "{steam_id}",
        "Select Menu Emoji": ""
      }
    },
    "Stats Not Found": {
      "Silent Response": true,
      "Content": "",
      "Title": "",
      "Description": "\u003E No results were found for the specified value \u0060{VALUE}\u0060!",
      "Fields": "",
      "Thumbnail": "",
      "Image": "",
      "HEX Color": "#ff8000",
      "Footer": "",
      "Footer Timestamp": false
    },
    "Invalid Search Format": {
      "Silent Response": true,
      "Content": "",
      "Title": "",
      "Description": "\u003E The entered value \u0060{VALUE}\u0060 is not in a valid format!",
      "Fields": "",
      "Thumbnail": "",
      "Image": "",
      "HEX Color": "#ff3333",
      "Footer": "",
      "Footer Timestamp": false
    }
  },
  "Search Player Modal": {
    "Modal Name": "Search Player Stats",
    "Value Label": "Insert player name",
    "Value Min Length": 3,
    "Value Max Length": 32
  },
  "ConfigVersion": 1
}

Servers List Configuration

  • There is a separate configuration for each server, for searching statistics

Database

Fill in the database connection for each server

SteamIdColumn

The exact name of the column that records the steamid of the players Preview: https://i.imgur.com/DqqZaaH.png

NameColumn

The exact name of the column that records the name of the players Preview: https://i.imgur.com/YGP1Mhv.png

SearchType

0: Search by SteamID 1: Search by name

Tables

List the names of all tables from which you want to display data Preview: https://i.imgur.com/BPDPe9x.png

StoredData

List the names of all columns from which you want to display data Preview: https://i.imgur.com/XigwJ2r.png (So as an example, we can use steam_id, name, kills, deaths, assists)

To edit the embeds, follow the instructions: Custom Embeds Format

Available Variables for Stats Found

• Names of all columns in StoredData So for example, if you have stored name, kills, deaths in StoredData you can use {name} , {kills} and {deaths} as variables. {VALUE} > The value that was searched for {SERVER} > The name of the selected server

Available Variables for Multiple Matches Found / Stats Not Found and Invalid Search Format

{VALUE} > The value that was searched for {SERVER} > The name of the selected server

Last updated