# Custom MVP Music
**Your players pick their own MVP anthem. The whole server hears it. The pick is remembered forever.**
The round ends, the MVP panel comes up - and instead of the same stock sting for the thousandth
time, the server hears the song that player chose. The game's own MVP music is silenced for that
round, so nothing plays over it. Chat announces who took the MVP, which song is playing, and how
many times that player has been MVP.
Players pick with `!mvp`. Their choice lives in MySQL, so it survives map changes, reconnects and
server restarts.
---
## Before you buy - read this part
**The songs come from a Steam Workshop addon that you build and publish yourself.** This plugin
does not ship music and cannot add music to a server on its own - CS2 only plays audio that is
already mounted on the client.
In practice that means: you put your `.mp3` files in a CS2 Workshop Tools addon, compile it,
publish it to the Workshop, and let MultiAddonManager hand it to players when they connect. The
included manual walks through it step by step, with a working `.vsndevts` example, and it is a
one-time job - after that you add songs by editing one config file.
If you already run a workshop addon on your server, you are most of the way there. If you have
never opened the Workshop Tools, budget an afternoon for the first addon.
Everything else - the menu, the permissions, the database, the announcements - is handled for you.
---
## What it does
**Every player picks their own anthem.** A menu built on MenuManager, so it inherits whatever menu
style your server already uses. One pick per player, stored per SteamID.
**Categories with their own permissions.** Group songs into sub-menus - Hip Hop, Chalga, Premium,
whatever you like. Put a flag on a category and every song inside it is locked to that flag. Great
for VIP-only sections.
**Shuffle.** A player can pick "random song" instead of a fixed one, either from the whole list or
from a single category. A different anthem every time they are MVP.
**A free tier for non-VIPs.** Let everyone use the first N songs and unlock the full list for a
flag of your choosing. One setting, no separate VIP plugin required - any plugin that grants
CounterStrikeSharp flags works, including `admins.json`, SimpleAdmin and every common VIP plugin.
**Players who do not want to hear other people's music can turn it off.** Per player, saved in the
database. Their own anthem still plays.
**Announcements that mean something.** The chat line carries the player's name, the song, and a
counter - "illusion is the MVP for the 23rd time". Fully re-writable, with colour tokens, and it
can also flash in the centre of the screen.
**Previews.** Picking a song plays it to that player immediately, and cuts off the preview that was
already running, so nothing overlaps.
**Music kits are silenced too.** Not just the stock anthem - if the MVP owns a music kit, that is
suppressed as well, so only your song plays.
**Every string is yours.** Menu labels, chat replies, the announcement, the prefix - all in the
config, all with colour tokens. Nothing is hard-coded in English.
---
## Built to survive a live server
These are the things you only notice when they are missing:
- **The database going down does not break the plugin.** Picks keep working in memory for the
session, every call retries on its own, and it recovers without a reload. Errors are logged at
most once a minute instead of flooding your console.
- **Writes never block the game thread.** They go through an ordered background queue, so two quick
picks by the same player can never land out of order and nothing stutters at round end.
- **Permissions are re-checked, not trusted once.** When a VIP expires the player falls back to the
default music and is told why - and because database-backed admin plugins grant flags a moment
after connect, a pick is never wrongly cleared in the first seconds of a session.
- **The MVP path does no hashing and no allocation.** Player state is indexed by slot.
- **Config reloads live.** `css_mvp_reload` re-reads the song list and even the chat command names
without restarting the server.
- **Bots, HLTV and players on default music are left completely alone** - the plugin does not touch
the event at all in that case.
---
## Requirements
| | |
|---|---|
| CounterStrikeSharp | `1.0.368` or newer |
| [MenuManagerCS2](https://github.com/NickFox007/MenuManagerCS2) | for the song menu |
| [MultiAddonManager](https://github.com/Source2ZE/MultiAddonManager) | mounts your workshop addon on the server and on clients |
| MySQL / MariaDB | stores the picks |
| A Steam Workshop addon with your songs | see the section above |
---
## Commands
| Command | Who |
|---|---|
| `!mvp` `/mvp` `!music` `/music` | players - opens the menu. The command names are configurable, and you can lock the menu behind a flag. |
| `css_mvp_test` | admin - lists the songs, or plays one to you to verify a soundevent name |
| `css_mvp_stop` | admin - stops a preview that is still running |
| `css_mvp_reload` | admin - reloads the config from disk |
---
## What you get
- The compiled plugin, ready to drop into `addons/counterstrikesharp/plugins/`.
- A full manual: every config key explained, a walkthrough for building the workshop addon
(including a working `.vsndevts` example), and a troubleshooting table.
- The database tables are created automatically on first connection. There is no SQL to import.
Source code is not included.
---
## Optional: pair it with a website
The plugin is complete on its own. If you also run the separate **MVP Music website**, point both
at the same database and your players get a Steam-login site where they browse songs, preview them
in the browser and pick their anthem there - plus an admin panel for songs and categories, with
play history and leaderboards. Changes made in the browser apply in game without a reconnect, and
the other way round.
Sold separately. The plugin needs nothing from it.
---
## Version
**1.3.1** - current release.
Recent additions: categories as sub-menus with their own shuffle and permissions, the per-player
mute for other players' anthems, the free-tier limit for non-VIPs, MVP counters in the
announcement, and optional website synchronisation.
---
## License and support
- Do not redistribute, resell, share or publish the files, in whole or in part.
- Updates for this major version are free.
- No refunds after the files have been delivered - the requirements above are listed in full, so
please make sure your setup matches before buying.
Questions before buying are welcome. For support after, reach me at **[ добави Discord / профил ]**
with your server's console output.
---
*Custom MVP Music - by illusion @ CodeStrike*