A module is an ordinary CounterStrikeSharp plugin that talks to CS2-SimpleAdmin through its
public API (shared/CS2-SimpleAdminApi/). Modules add commands, put their own categories into the
admin menu, react to bans and mutes, or issue penalties themselves, without touching the plugin.
Each module is installed, configured and reloaded on its own, in its own
plugins/<ModuleName>/ folder.
The release zip contains the ones marked in the release zip; the others are kept in
Modules/ as source, to build
yourself. Generated from the Modules/ folder at build time.
CS2-SimpleAdmin Fun Commands
in the release zipv1.0.0
Noclip, god mode, freeze, respawn, give and strip weapons, HP, speed, gravity, money and resize, as commands and as a Fun category in the admin menu. The reference module for writing your own.
To leave a shipped module out, delete its folder under addons/counterstrikesharp/plugins/. How to
use the two shipped modules is in Fun commands and stealth.
Reference CS2-SimpleAdminApi.dll (from the release zip’s shared/CS2-SimpleAdminApi/ or a build
of CS2-SimpleAdminApi/)
as a compile-time reference, the way the modules in the repository do:
Register commands through the API, as the Fun Commands module does, and unregister them in
Unload. Permissions come from the usual CounterStrikeSharp attributes on the handler:
Add a category to the admin menu and menus inside it. The MenuContext overloads pass the title
and category to your factory, so the back button works without repeating them:
privatevoidRegisterMenus()
{
_api!.RegisterMenuCategory("mymodule", "My module", "@css/generic");
_api.RegisterMenu("mymodule", "slap", "Slap a player", CreateSlapMenu, "@css/slay");
player =>player.IsValid&&AdminManager.CanPlayerTarget(admin, player),
(adminPlayer, target) => { /* act on target */ });
// in Unload: _api.UnregisterMenu("mymodule", "slap");
For translated menu and activity texts, pass your module’s Localizer to the overloads that take
moduleLocalizer; each player then sees your strings in their own language
(Module translations shows the full pattern).
Every member, with its signature and documentation, is in the API reference.