# 📊 CS2 Stats Ultimate
**Version 1.0.2** · CounterStrikeSharp plugin · by illusion @ CodeStrike
Detailed player statistics in a **clickable in-game panel** (Panorama UI), no chat spam and no
website needed. Players type `!stats` and get a full stats screen they can click through with the
mouse.
---
## ✨ Features
**Overview tab**
- Kills, deaths, assists, MVPs
- K/D, KDA, HS %, ADR, win %, accuracy (with bars)
- **Rating** (HLTV-style, 1.00 = average) coloured by skill
- Rank on the server (`#12 / 340`), matches, rounds, time played, best kill streak, longest kill
**Combat tab**
- Multi-kills: 1K, 2K, 3K, 4K, **ACE**
- Opening kills / deaths, clutches won, kills per round, total damage
- Wallbangs, no-scopes, kills while blind, through smoke, in the air, knife, grenade
- Utility damage, enemies flashed, flash assists, bombs planted / defused, dominations, revenges
**Weapons tab**: your 8 best weapons with icons, kills, headshot % and a share bar.
**Top 10 tab**: the best players on the server.
**All-time / This map** switch on every tab.
- Saved in MySQL / MariaDB, several servers can share one database.
- Stats are only recorded with enough real players (no farming on an empty server), warmup is ignored.
- English and Bulgarian.
---
## 📋 Requirements
| What | Notes |
|---|---|
| Metamod:Source + **CounterStrikeSharp v1.0.376 or newer** | 376+ is needed for the Panorama panel |
| **MultiAddonManager** | loads the panel (workshop addon) for players |
| **MySQL or MariaDB** database | any hosting database works |
---
## 🚀 Installation
### 1. Plugin
Copy the **`CS2Stats`** folder to `game/csgo/addons/counterstrikesharp/plugins/`.
### 2. Panel (workshop addon), pick ONE
**Option A: our workshop addon (easiest).** Add `3837941466` to `mm_extra_addons` in
`game/csgo/cfg/multiaddonmanager/multiaddonmanager.cfg`:
```
mm_extra_addons "3837941466"
```
If you already load other addons, separate the IDs with commas: `mm_extra_addons "111,222,3837941466"`.
**Option B: your own addon.** Copy the files from `workshop-addon/panorama/...` in this archive
into `game/csgo_addons/<your_addon>/panorama/...` (same folders), publish the addon with the CS2
Workshop Manager and add its ID to `mm_extra_addons`.
### 3. Database
Start the server once. The config is created at
`game/csgo/addons/counterstrikesharp/configs/plugins/CS2Stats/CS2Stats.json`.
Fill in the `Database` section and restart. The tables are created automatically.
```json
"Database": {
"Host": "localhost",
"Port": 3306,
"User": "root",
"Password": "your_password",
"Database": "cs2_stats",
"TablePrefix": "cs2stats_"
}
```
### 4. Done
Change the map and type `!stats` in game.
---
## 🎮 Commands
| Command | What it does |
|---|---|
| `!stats` / `/stats` | Opens your stats panel (`/stats` opens it without a chat message) |
| `!stats <name>` | Opens the stats of another player on the server |
| `!top` | Opens the Top 10 |
| `!rank` | Shows your rank, K/D, HS % and rating in chat |
Close the panel with the **×** button.
---
## ⚙️ Configuration
| Setting | Default | What it does |
|---|---|---|
| `ServerLanguage` | `en` | `en` or `bg` |
| `Database` | — | MySQL connection (see above) |
| `PanoramaLayout` | `panorama/layout/custom_game/cs2stats.xml` | Leave as is unless you renamed the files |
| `MinPlayers` | `2` | Real players needed before stats are recorded |
| `CountBotKills` | `true` | Kills on bots count |
| `TrackWarmup` | `false` | Record stats during warmup |
| `MinRoundsForTop` | `20` | Rounds needed to appear in the Top 10 and get a rank |
| `ChatPrefix` | `[Stats]` | Chat prefix |
---
## ❓ FAQ
**`!stats` says the panel is not available / nothing opens.**
The workshop addon is not loaded. Check `mm_extra_addons`, type `mm_download_addon 3837941466` in
the server console and change the map. On your own PC re-subscribe to the workshop item in Steam.
**My stats don't go up.**
Stats are only recorded with at least `MinPlayers` real players and not in warmup.
**"Stats are still loading".**
The database connection failed. Check the `Database` section and the server console for
`[Stats] Database connection failed`.
**I'm not in the Top 10 / my rank says UNRANKED.**
A player needs at least `MinRoundsForTop` rounds (default 20) to get a rank and appear in the Top 10.
For a quick test set it to `1`, play a round and wait up to a minute (the Top 10 is cached for 60 seconds).
**My rating is huge (e.g. 11.00) after a few rounds.**
The rating is per round, so it jumps around with very few rounds. After 20+ rounds it settles
around 0.80 to 1.50.
**When are stats saved?**
At the end of every round, when a player leaves and on map change.