Replace MenuManagerCS2 with Panorama UI Kit for the admin menus and css_vote. Layout names (menu, vote, banner, toast) are configurable under MenuConfig and preloaded on startup; MenuType is removed and ConfigVersion bumped to 26. - Drop MenuManagerApi.dll and the old chat menu classes - Reference PanoramaUiKit.Shared.dll, bump CounterStrikeSharp to 1.0.376 - Add .editorconfig and CODING_CONVENTIONS.md, apply them codebase-wide - Remove the CS2-SimpleAdmin-docs site - Rewrite README for the fork
4.4 KiB
CS2-SimpleAdmin (Panorama UI Kit fork)
Fork of daffyyyy/CS2-SimpleAdmin, the CounterStrikeSharp admin plugin for Counter-Strike 2. This fork replaces the chat / center HTML menus with Panorama UI Kit: admin menus and votes are drawn as real Panorama panels on the player's screen.
Every command, the penalty system, the database schema and the module API stay compatible with upstream. Existing servers and modules keep working once the new dependencies are installed.
What changes compared to upstream
- Panorama menus: the admin menu (
css_admin), the player / duration / reason pickers and module menus open as a Panorama UI Kit menu instead of a MenuManagerCS2 menu. - Panorama votes:
css_voteshows a vote screen to every player, collects one answer each, closes after 30 seconds and prints the results in chat. - Configurable layouts: the menu, vote, banner and toast layout names are set in the config, so you can use your own Panorama layouts.
- No more MenuManagerCS2 stack: MenuManagerCS2, PlayerSettings and AnyBaseLibCS2 are no longer required.
- Code style: the whole codebase follows CODING_CONVENTIONS.md (explicit types, no ternaries, braces everywhere), enforced by
.editorconfig.
Features (inherited from upstream)
- Bans, IP bans, offline bans, mutes, gags, silences and warnings with durations and reasons
- MySQL backend, with experimental SQLite support
- Multi-server: penalties and admins synced across servers sharing a database
- Admin groups, immunity and permission overrides
- Penalty history (
css_history) and connect notifications - Discord webhooks for penalties and admin actions
- Module API (
CS2-SimpleAdminApi) to add commands, menus and penalty hooks from other plugins
Requirements
- CounterStrikeSharp 1.0.376 or newer
- Panorama UI Kit:
plugins/PanoramaUiKitandshared/PanoramaUiKit.Shared - PanoramaManager, required by Panorama UI Kit
- The Panorama UI Kit Workshop addon mounted on the server (or your own layouts that follow its contracts)
- A MySQL database, or SQLite
If Panorama UI Kit is missing at startup, SimpleAdmin logs Panorama UI Kit not found and menus will not open.
Installation
- Install CounterStrikeSharp, PanoramaManager and Panorama UI Kit, and mount the UI Kit Workshop addon.
- Build this repository (see Building) or download a release, then copy
CS2-SimpleAdminintoaddons/counterstrikesharp/plugins/andCS2-SimpleAdminApiintoaddons/counterstrikesharp/shared/. - Start the server once. The config is generated at:
addons/counterstrikesharp/configs/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.json - Fill in the database settings and restart.
Configuration
The generated config is the upstream one (ConfigVersion 26). The old MenuType key is replaced by layout names under MenuConfig:
"MenuConfig": {
"MenuLayout": "uikit_menu",
"VoteLayout": "uikit_vote",
"BannerLayout": "uikit_banner",
"ToastLayout": "uikit_toast"
}
Keep the defaults to use the Workshop addon layouts, or point them at your own. The layouts are preloaded when the plugin starts, so they are not created on the first menu open.
Building
dotnet build CS2-SimpleAdmin.sln -c Release
dotnet format CS2-SimpleAdmin.sln
The project targets .NET 10. PanoramaUiKit.Shared.dll is referenced from CS2-SimpleAdmin/3rd_party/.
Modules
Upstream modules live in Modules/. See MODULE_DEVELOPMENT.md to write your own. Menus registered through the API are rendered with Panorama UI Kit automatically.
Documentation
Commands, permissions and the general configuration are documented in the upstream wiki: cs2-simpleadmin.daffyy.dev.
Credits
- daffyyyy for CS2-SimpleAdmin, which this fork is based on
- Hackmastr, whose work inspired the original plugin
- Next-il for PanoramaManager
License
GPL-3.0, like upstream. See LICENSE.