Add CS2-SimpleAdmin documentation site

Introduces a new documentation site for CS2-SimpleAdmin using Docusaurus, including developer API references, tutorials, user guides, and module documentation. Removes the CleanModule example and updates FunCommands and ExampleModule. Also updates main plugin and API files to support new documentation and module structure.
This commit is contained in:
Dawid Bepierszcz
2025-10-20 01:27:01 +02:00
parent 21a5de6b3d
commit b0d8696756
74 changed files with 32732 additions and 279 deletions

View File

@@ -0,0 +1,262 @@
---
sidebar_position: 1
---
# Ban Commands
Commands for managing player bans.
## Ban Player
Ban a player currently on the server.
```bash
css_ban <#userid or name> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/ban`
**Examples:**
```bash
css_ban @all 60 "Timeout for everyone"
css_ban #123 1440 "Hacking - 1 day ban"
css_ban PlayerName 0 "Permanent ban for cheating"
css_ban @ct 30 "CT team timeout"
```
**Notes:**
- Time in minutes (0 = permanent)
- Supports player targeting (@all, @ct, @t, #userid, name)
- Reason is optional but recommended
---
## Add Ban (Offline Player)
Ban a player by SteamID even if they're not online.
```bash
css_addban <steamid> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/ban`
**Examples:**
```bash
css_addban STEAM_1:0:12345678 1440 "Ban evasion"
css_addban 76561198012345678 10080 "Hacking - 7 day ban"
css_addban STEAM_1:1:87654321 0 "Permanent ban"
```
**Supported SteamID formats:**
- SteamID64: `76561198012345678`
- SteamID: `STEAM_1:0:12345678`
- SteamID3: `[U:1:12345678]`
---
## Ban IP Address
Ban an IP address.
```bash
css_banip <ip> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/ban`
**Examples:**
```bash
css_banip 192.168.1.100 1440 "Ban evasion attempt"
css_banip 10.0.0.5 0 "Persistent troublemaker"
```
**Notes:**
- Useful for preventing ban evasion
- Can be combined with SteamID bans
- Check config for `BanType` setting (SteamID, IP, or Both)
---
## Unban Player
Remove a ban from a player.
```bash
css_unban <steamid or name or ip> [reason]
```
**Permission:** `@css/unban`
**Examples:**
```bash
css_unban 76561198012345678 "Appeal accepted"
css_unban STEAM_1:0:12345678 "Ban lifted"
css_unban 192.168.1.100 "Wrong person banned"
css_unban PlayerName "Mistake"
```
**Notes:**
- Works with SteamID, IP, or player name
- Unban reason is logged
- Can unban offline players
---
## Warn Player
Issue a warning to a player.
```bash
css_warn <#userid or name> [reason]
```
**Permission:** `@css/kick`
**Examples:**
```bash
css_warn #123 "Mic spam"
css_warn PlayerName "Language"
css_warn @all "Final warning"
```
**Notes:**
- Warnings can accumulate
- Auto-escalation to bans based on `WarnThreshold` config
- Example: 3 warnings = 1 hour ban, 4 warnings = 2 hour ban
**Warning Threshold Configuration:**
```json
"WarnThreshold": {
"3": "css_addban STEAMID64 60 \"3 warnings\"",
"4": "css_ban #USERID 120 \"4 warnings\""
}
```
---
## Unwarn Player
Remove a warning from a player.
```bash
css_unwarn <steamid or name>
```
**Permission:** `@css/kick`
**Examples:**
```bash
css_unwarn 76561198012345678
css_unwarn PlayerName
```
**Notes:**
- Removes the most recent warning
- Helps manage warning thresholds
- Can be used for offline players
---
## Permission Requirements
| Command | Required Permission | Description |
|---------|-------------------|-------------|
| `css_ban` | `@css/ban` | Ban online players |
| `css_addban` | `@css/ban` | Ban offline players by SteamID |
| `css_banip` | `@css/ban` | Ban IP addresses |
| `css_unban` | `@css/unban` | Remove bans |
| `css_warn` | `@css/kick` | Issue warnings |
| `css_unwarn` | `@css/kick` | Remove warnings |
## Ban Types
Configure ban behavior in `CS2-SimpleAdmin.json`:
```json
"BanType": 1
```
**Options:**
- `1` - SteamID only (default)
- `2` - IP only
- `3` - Both SteamID and IP
## Time Durations
Common time values:
| Duration | Minutes | Description |
|----------|---------|-------------|
| 1 minute | 1 | Very short timeout |
| 5 minutes | 5 | Short timeout |
| 15 minutes | 15 | Medium timeout |
| 1 hour | 60 | Standard timeout |
| 1 day | 1440 | Daily ban |
| 1 week | 10080 | Weekly ban |
| 2 weeks | 20160 | Bi-weekly ban |
| 1 month | 43200 | Monthly ban |
| Permanent | 0 | Never expires |
## Player Targeting
All ban commands support advanced targeting:
- `@all` - Target all players
- `@ct` - Target all Counter-Terrorists
- `@t` - Target all Terrorists
- `@spec` - Target all spectators
- `#123` - Target by userid
- `PlayerName` - Target by name (partial match)
## Best Practices
### Banning
1. **Always provide a reason** - Helps with appeals and record keeping
2. **Use appropriate durations** - Don't permaban for minor offenses
3. **Check ban history** - Use `css_who` to see if player has priors
4. **Consider warnings first** - Give players a chance to improve
### Warning System
1. **Be consistent** - Use warnings for minor offenses
2. **Configure thresholds** - Set up auto-escalation in config
3. **Communicate clearly** - Let players know why they're warned
4. **Review regularly** - Check warning history with `css_warns`
### Multi-Account Detection
When `CheckMultiAccountsByIp` is enabled:
- Plugin detects multiple accounts from same IP
- Sends Discord notifications if configured
- Helps identify ban evasion
## Troubleshooting
### Ban doesn't work
**Check:**
- Do you have `@css/ban` permission?
- Is the SteamID format correct?
- Check server console for errors
### Player rejoins after ban
**Check:**
- Is `MultiServerMode` enabled if using multiple servers?
- Is the database shared across servers?
- Check ban type configuration (SteamID vs IP)
### Warning threshold not working
**Check:**
- Is `WarnThreshold` configured correctly?
- Are the command formats correct in config?
- Check server console for execution errors
## Related Commands
- **[Communication Commands](basecomms)** - Mute, gag, silence
- **[Player Commands](playercommands)** - Kick, slay, etc.
- **[Base Commands](basecommands)** - Admin management

View File

@@ -0,0 +1,442 @@
---
sidebar_position: 4
---
# Chat Commands
Admin chat and messaging commands.
## Admin Chat
### Admin Say (Private)
Send a message to all online admins only.
```bash
css_asay <message>
```
**Permission:** `@css/chat`
**Features:**
- Only admins see the message
- Useful for admin coordination
- Colored differently from regular chat
**Examples:**
```bash
css_asay "Player is suspicious, keep an eye on them"
css_asay "I'm going AFK for 5 minutes"
css_asay "Need help with a situation"
```
**Message format:**
```
[ADMIN] YourName: message
```
---
## Public Announcements
### CSS Say (Colored)
Send a colored message to all players.
```bash
css_cssay <message>
```
**Permission:** `@css/chat`
**Features:**
- Colorful formatted message
- Visible to all players
- Stands out from regular chat
**Examples:**
```bash
css_cssay "Server will restart in 5 minutes!"
css_cssay "Welcome to our server!"
css_cssay "Rules: No cheating, be respectful"
```
---
### Say (With Prefix)
Send a message to all players with admin prefix.
```bash
css_say <message>
```
**Permission:** `@css/chat`
**Features:**
- Message shows with "(ADMIN)" prefix
- Visible to all players
- Authority message format
**Examples:**
```bash
css_say "Please be respectful in chat"
css_say "Cheating will result in permanent ban"
css_say "Type !rules for server rules"
```
**Message format:**
```
(ADMIN) YourName: message
```
---
### Private Say (Whisper)
Send a private message to a specific player.
```bash
css_psay <#userid or name> <message>
```
**Permission:** `@css/chat`
**Features:**
- Only the target player sees the message
- Useful for private warnings or help
- Doesn't clutter public chat
**Examples:**
```bash
css_psay #123 "Please stop mic spamming"
css_psay PlayerName "You need to join a team"
css_psay @all "This is a private message to everyone"
```
**Target receives:**
```
(ADMIN to you) AdminName: message
```
---
### Center Say
Display a message in the center of all players' screens.
```bash
css_csay <message>
```
**Permission:** `@css/chat`
**Features:**
- Large text in center of screen
- Impossible to miss
- Useful for important announcements
**Examples:**
```bash
css_csay "ROUND STARTS IN 10 SECONDS"
css_csay "FREEZE! Don't move!"
css_csay "Server restarting NOW"
```
**Display:**
- Shows in center of screen
- Large, bold text
- Auto-fades after a few seconds
---
### HUD Say
Display a message on players' HUD (screen overlay).
```bash
css_hsay <message>
```
**Permission:** `@css/chat`
**Features:**
- Message appears on screen overlay
- Less intrusive than center say
- Stays visible longer
**Examples:**
```bash
css_hsay "Tournament starting soon!"
css_hsay "New map voting available"
css_hsay "Visit our website: example.com"
```
---
## Usage Examples
### Announcements
```bash
# Server restart warning
css_cssay "Server will restart in 10 minutes! Save your progress!"
# Center screen countdown
css_csay "5"
# Wait...
css_csay "4"
css_csay "3"
css_csay "2"
css_csay "1"
css_csay "GO!"
```
### Player Communication
```bash
# Private warning
css_psay PlayerName "This is your first warning for chat spam"
# Public announcement
css_say "Everyone please be quiet for the next round"
# Admin coordination
css_asay "I'm spectating the suspicious player in T spawn"
```
### Event Management
```bash
# Tournament announcement
css_cssay "⚠ TOURNAMENT STARTING IN 5 MINUTES ⚠"
css_hsay "Teams, please get ready!"
css_csay "TOURNAMENT BEGINS NOW!"
```
---
## Color Codes
Many chat commands support color codes:
```
{default} - Default chat color
{white} - White
{darkred} - Dark red
{green} - Green
{lightyellow} - Light yellow
{lightblue} - Light blue
{olive} - Olive
{lime} - Lime
{red} - Red
{purple} - Purple
{grey} - Grey
{yellow} - Yellow
{gold} - Gold
{silver} - Silver
{blue} - Blue
{darkblue} - Dark blue
{bluegrey} - Blue grey
{magenta} - Magenta
{lightred} - Light red
{orange} - Orange
```
**Example:**
```bash
css_say "{red}WARNING: {default}No camping in spawn!"
```
---
## Message Targeting
Some commands support player targeting for private messages:
### Supported Targets
- `@all` - All players (private message to each)
- `@ct` - All Counter-Terrorists
- `@t` - All Terrorists
- `@spec` - All spectators
- `#123` - Specific userid
- `PlayerName` - Player by name
**Examples:**
```bash
# Private message to all CTs
css_psay @ct "Defend bombsite A this round"
# Private message to all terrorists
css_psay @t "Rush B with smoke and flash"
# Message to spectators
css_psay @spec "Type !join to play"
```
---
## Best Practices
### When to Use Each Command
**css_asay** (Admin Say):
- Admin coordination
- Discussing player behavior
- Planning admin actions
- Private admin discussions
**css_cssay** (Colored Say):
- Important server announcements
- Event notifications
- Eye-catching messages
- Server information
**css_say** (Say):
- General admin announcements
- Rule reminders
- Warnings to all players
- Admin presence
**css_psay** (Private Say):
- Private warnings
- Individual help
- Direct player communication
- Discretion needed
**css_csay** (Center Say):
- Emergency announcements
- Cannot-miss messages
- Round starts/events
- Countdowns
**css_hsay** (HUD Say):
- Persistent information
- Less urgent announcements
- Server info
- Website/Discord links
---
## Communication Guidelines
### Professional Communication
1. **Be clear and concise** - Don't spam long messages
2. **Use appropriate command** - Don't center-spam trivial messages
3. **Check for typos** - You represent the server
4. **Avoid excessive colors** - Can be hard to read
### Spam Prevention
1. **Don't overuse center say** - Very intrusive for players
2. **Space out announcements** - Don't flood chat
3. **Use HUD say for persistent info** - Less annoying
4. **Coordinate with other admins** - Avoid duplicate messages
### Effective Messaging
**Good Examples:**
```bash
css_cssay "🎯 New map voting system available! Type !mapvote"
css_psay PlayerName "Hey! Please enable your mic or use team chat"
css_asay "Checking player demos for possible aimbot"
```
**Poor Examples:**
```bash
css_csay "hi" # Don't use center say for trivial messages
css_cssay "a" "b" "c" "d" # Don't spam center messages
css_say "asdfasdfasdf" # Unprofessional
```
---
## Silent Mode
Admins can use silent mode to hide their activity:
```bash
css_hide # Toggle silent mode
```
When in silent mode:
- Chat messages still work
- Admin name might be hidden (depends on config)
- Useful for undercover moderation
---
## Configuration
### Show Activity Type
Controls how admin actions are displayed:
```json
"ShowActivityType": 2
```
**Options:**
- `0` - Hide all admin activity
- `1` - Anonymous ("An admin says...")
- `2` - Show name ("AdminName says...")
---
## Chat Restrictions
### Respecting Gags
Remember that:
- `css_asay` works even if admin is gagged (admin chat)
- Other commands respect communication penalties
- Can't use chat commands while silenced
### Permission Requirements
All chat commands require `@css/chat` permission:
```bash
css_addadmin STEAMID "Name" "@css/chat" 50 0
```
Or add to a group with chat permission:
```bash
css_addgroup "#moderators" "@css/chat,@css/kick" 50
```
---
## Troubleshooting
### Messages not showing
**Check:**
- Do you have `@css/chat` permission?
- Are you silenced/gagged?
- Check console for errors
- Verify player is connected (for css_psay)
### Colors not working
**Check:**
- Use correct color code syntax: `{red}`
- Some commands may not support colors
- Different chat systems handle colors differently
### Players can't see center/HUD messages
**Check:**
- CS2 client-side chat settings
- Conflicting HUD plugins
- Server console for errors
---
## Related Commands
- **[Communication Commands](basecomms)** - Gag, mute, silence players
- **[Base Commands](basecommands)** - Admin management
- **[Ban Commands](basebans)** - Player punishment

View File

@@ -0,0 +1,626 @@
---
sidebar_position: 3
---
# Base Commands
Core admin commands for server management and admin system.
## Player Information
### Show Penalties
View your own active penalties.
```bash
css_penalties
css_mypenalties
css_comms
```
**Permission:** None (all players)
**Shows:**
- Active bans
- Active communication restrictions (gag, mute, silence)
- Warning count
- Duration remaining
---
### Hide Penalty Notifications
Hide penalty notifications when you connect to the server.
```bash
css_hidecomms
```
**Permission:** `@css/kick`
**Notes:**
- Toggle on/off
- Admins won't see penalty notifications on join
- Useful for admin privacy
---
## Admin Menu
### Open Admin Menu
Opens the main admin menu interface.
```bash
css_admin
```
**Permission:** `@css/generic`
**Features:**
- Player management
- Server management
- Ban/kick/mute players via menu
- Map changing
- Custom server commands
---
### Admin Help
Print the admin help file.
```bash
css_adminhelp
```
**Permission:** `@css/generic`
**Shows:**
- Available commands for your permission level
- Command syntax
- Permission requirements
---
## Admin Management
### Add Admin
Add a new admin to the database.
```bash
css_addadmin <steamid> <name> <flags/groups> <immunity> <duration>
```
**Permission:** `@css/root`
**Parameters:**
- `steamid` - Player's SteamID (any format)
- `name` - Admin name (for identification)
- `flags/groups` - Permission flags or group name
- `immunity` - Immunity level (0-100, higher = more protection)
- `duration` - Duration in minutes (0 = permanent)
**Examples:**
```bash
# Add permanent admin with root access
css_addadmin 76561198012345678 "AdminName" "@css/root" 99 0
# Add moderator for 30 days
css_addadmin STEAM_1:0:12345678 "ModName" "@css/kick,@css/ban" 50 43200
# Add admin using group
css_addadmin 76561198012345678 "AdminName" "#moderators" 60 0
# Add admin to all servers (-g flag)
css_addadmin 76561198012345678 "AdminName" "@css/root" 99 0 -g
```
**Flags:**
- `-g` - Add to all servers (global admin)
---
### Delete Admin
Remove an admin from the database.
```bash
css_deladmin <steamid>
```
**Permission:** `@css/root`
**Examples:**
```bash
# Remove admin from current server
css_deladmin 76561198012345678
# Remove admin from all servers (-g flag)
css_deladmin 76561198012345678 -g
```
---
### Add Admin Group
Create a new admin group.
```bash
css_addgroup <group_name> <flags> <immunity>
```
**Permission:** `@css/root`
**Parameters:**
- `group_name` - Name of the group (e.g., "#moderators")
- `flags` - Permission flags for the group
- `immunity` - Default immunity level for group members
**Examples:**
```bash
# Create moderator group
css_addgroup "#moderators" "@css/kick,@css/ban,@css/chat" 50
# Create VIP group
css_addgroup "#vip" "@css/vip" 10
# Create global group (-g flag)
css_addgroup "#owner" "@css/root" 99 -g
```
**Flags:**
- `-g` - Create group on all servers
---
### Delete Admin Group
Remove an admin group from the database.
```bash
css_delgroup <group_name>
```
**Permission:** `@css/root`
**Examples:**
```bash
# Delete group from current server
css_delgroup "#moderators"
# Delete group from all servers (-g flag)
css_delgroup "#moderators" -g
```
---
### Reload Admins
Reload admin permissions from the database.
```bash
css_reloadadmins
```
**Permission:** `@css/root`
**When to use:**
- After adding/removing admins via database
- After modifying admin permissions
- After group changes
- Troubleshooting permission issues
**Note:** Admins are automatically reloaded periodically and on map change (if configured).
---
## Player Information
### Hide in Scoreboard
Toggle admin stealth mode (hide from scoreboard).
```bash
css_hide
css_stealth
```
**Permission:** `@css/kick`
**Features:**
- Hides you from the scoreboard
- Makes admin actions anonymous
- Useful for undercover moderation
---
### Who is This Player
Show detailed information about a player.
```bash
css_who <#userid or name>
```
**Permission:** `@css/generic`
**Shows:**
- Player name and SteamID
- IP address (if you have `@css/showip` permission)
- Connection time
- Active penalties
- Warning count
- Ban history
**Examples:**
```bash
css_who #123
css_who PlayerName
css_who @me
```
---
### Show Disconnected Players
Show recently disconnected players.
```bash
css_disconnected
css_last
css_last10 # Show last 10 (config value)
```
**Permission:** `@css/kick`
**Shows:**
- Player name
- SteamID
- Disconnect time
- Disconnect reason
**Configuration:**
```json
"DisconnectedPlayersHistoryCount": 10
```
---
### Show Warns for Player
Open warn list for a specific player.
```bash
css_warns <#userid or name>
```
**Permission:** `@css/kick`
**Shows:**
- All warnings for the player
- Warning reasons
- Admins who issued warnings
- Warning timestamps
- Total warning count
**Examples:**
```bash
css_warns #123
css_warns PlayerName
```
---
### Show Online Players
Show information about all online players.
```bash
css_players
```
**Permission:** `@css/generic`
**Shows:**
- List of all connected players
- UserIDs
- Names
- Teams
- Connection status
---
## Server Management
### Kick Player
Kick a player from the server.
```bash
css_kick <#userid or name> [reason]
```
**Permission:** `@css/kick`
**Examples:**
```bash
css_kick #123 "AFK"
css_kick PlayerName "Rule violation"
css_kick @spec "Cleaning spectators"
```
**Configuration:**
```json
"KickTime": 5
```
Delay in seconds before kicking (allows player to see the reason).
---
### Change Map
Change to a different map.
```bash
css_map <mapname>
css_changemap <mapname>
```
**Permission:** `@css/changemap`
**Examples:**
```bash
css_map de_dust2
css_changemap de_mirage
```
**Configuration:**
```json
"DefaultMaps": [
"de_dust2",
"de_mirage",
"de_inferno"
]
```
Maps in this list appear in the map change menu.
---
### Change Workshop Map
Change to a workshop map by ID or name.
```bash
css_wsmap <name or id>
css_changewsmap <name or id>
css_workshop <name or id>
```
**Permission:** `@css/changemap`
**Examples:**
```bash
css_wsmap 123456789
css_wsmap aim_map
```
**Configuration:**
```json
"WorkshopMaps": {
"aim_map": "123456789",
"surf_map": "987654321"
}
```
Maps configured here can be changed by name instead of ID.
---
### Change CVar
Change a server console variable.
```bash
css_cvar <cvar> <value>
```
**Permission:** `@css/cvar`
**Examples:**
```bash
css_cvar sv_cheats 1
css_cvar mp_roundtime 5
css_cvar mp_maxmoney 16000
```
**Warning:** This is a powerful command. Only grant to trusted admins.
---
### Execute RCON Command
Execute any command as the server.
```bash
css_rcon <command>
```
**Permission:** `@css/rcon`
**Examples:**
```bash
css_rcon status
css_rcon changelevel de_dust2
css_rcon sv_cheats 1
```
**Warning:** Extremely powerful command. Only grant to server owners.
**Configuration:**
```json
"DisableDangerousCommands": true
```
When enabled, prevents execution of dangerous commands via css_rcon.
---
### Restart Game
Restart the current game/round.
```bash
css_rr
css_rg
css_restart
css_restartgame
```
**Permission:** `@css/generic`
**Notes:**
- Restarts the current round
- Score is reset
- Players remain connected
---
## Permission Flags
Common permission flags used in CS2-SimpleAdmin:
| Flag | Description | Common Use |
|------|-------------|------------|
| `@css/generic` | Generic admin access | Basic admin menu, info commands |
| `@css/chat` | Chat management | Gag, mute, silence |
| `@css/kick` | Kick players | Kick, warnings, player info |
| `@css/ban` | Ban players | Ban, banip, addban |
| `@css/unban` | Unban players | Remove bans |
| `@css/permban` | Permanent bans | Issue permanent bans |
| `@css/changemap` | Change maps | Map changing |
| `@css/cvar` | Change cvars | Server variable modification |
| `@css/rcon` | Execute rcon | Full server control |
| `@css/root` | Root access | All permissions, admin management |
| `@css/slay` | Slay/respawn | Player manipulation |
| `@css/cheats` | Cheat commands | God mode, noclip, give weapons |
| `@css/showip` | View IPs | See player IP addresses |
---
## Immunity System
Immunity prevents lower-level admins from targeting higher-level admins.
**How it works:**
- Each admin has an immunity value (0-100)
- Higher immunity = more protection
- Admins can only target players with lower immunity
**Example:**
- Admin A has immunity 50
- Admin B has immunity 30
- Admin A can ban Admin B
- Admin B cannot ban Admin A
**Best Practice:**
- Owner: 99
- Senior admins: 80-90
- Moderators: 50-70
- Trial mods: 20-40
- Regular players: 0
---
## Configuration Options
### Reload Admins on Map Change
```json
"ReloadAdminsEveryMapChange": false
```
**Options:**
- `true` - Reload admin permissions every map change
- `false` - Only reload when explicitly requested (better performance)
### Show Activity Type
```json
"ShowActivityType": 2
```
**Options:**
- `0` - Hide all admin activity
- `1` - Show activity anonymously ("An admin banned PlayerName")
- `2` - Show admin name ("AdminName banned PlayerName")
---
## Best Practices
### Admin Management
1. **Use groups** - Easier to manage than individual permissions
2. **Set appropriate immunity** - Prevent abuse
3. **Time-limited admin** - For trial moderators
4. **Document changes** - Keep track of who has what permissions
### Permission Assignment
**Recommended hierarchy:**
```
Root (@css/root, immunity 99):
- Server owners only
Senior Admin (@css/ban,@css/kick,@css/chat,@css/changemap, immunity 80):
- Trusted long-term admins
Moderator (@css/kick,@css/chat, immunity 50):
- Regular moderators
Trial Mod (@css/kick, immunity 20):
- New moderators on probation
```
### Security
1. **Limit @css/rcon** - Only to server owner
2. **Limit @css/cvar** - Only to senior admins
3. **Monitor admin actions** - Review logs regularly
4. **Use time-limited admin** - For temporary staff
---
## Troubleshooting
### Admin permissions not working
**Check:**
1. Is admin correctly added with `css_addadmin`?
2. Run `css_reloadadmins`
3. Check database connection
4. Verify SteamID format
### Can't target another admin
**Check:**
- Your immunity level vs target's immunity
- You need equal or higher immunity to target
### Commands not available
**Check:**
- Your permission flags
- Commands.json for disabled commands
- Server console for errors
---
## Related Commands
- **[Ban Commands](basebans)** - Player punishment
- **[Communication Commands](basecomms)** - Chat/voice management
- **[Player Commands](playercommands)** - Player manipulation

View File

@@ -0,0 +1,396 @@
---
sidebar_position: 2
---
# Communication Commands
Commands for managing player communication (voice and text chat).
## Overview
CS2-SimpleAdmin provides three types of communication restrictions:
- **Gag** - Blocks text chat only
- **Mute** - Blocks voice chat only
- **Silence** - Blocks both text and voice chat
---
## Gag Commands
### Gag Player
Prevent a player from using text chat.
```bash
css_gag <#userid or name> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_gag #123 30 "Chat spam"
css_gag PlayerName 1440 "Advertising"
css_gag @all 5 "Everyone quiet for 5 minutes"
```
### Add Gag (Offline Player)
Gag a player by SteamID even if they're offline.
```bash
css_addgag <steamid> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_addgag 76561198012345678 60 "Chat abuse"
css_addgag STEAM_1:0:12345678 1440 "Spam"
```
### Ungag Player
Remove a gag from a player.
```bash
css_ungag <steamid or name> [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_ungag PlayerName "Appeal accepted"
css_ungag 76561198012345678 "Mistake"
```
---
## Mute Commands
### Mute Player
Prevent a player from using voice chat.
```bash
css_mute <#userid or name> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_mute #123 30 "Mic spam"
css_mute PlayerName 60 "Loud music"
css_mute @t 5 "T team timeout"
```
### Add Mute (Offline Player)
Mute a player by SteamID even if they're offline.
```bash
css_addmute <steamid> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_addmute 76561198012345678 120 "Voice abuse"
css_addmute STEAM_1:0:12345678 1440 "Mic spam"
```
### Unmute Player
Remove a mute from a player.
```bash
css_unmute <steamid or name> [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_unmute PlayerName "Behavior improved"
css_unmute 76561198012345678 "Time served"
```
---
## Silence Commands
### Silence Player
Block both text and voice chat from a player.
```bash
css_silence <#userid or name> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_silence #123 60 "Complete communication ban"
css_silence PlayerName 1440 "Severe abuse"
```
### Add Silence (Offline Player)
Silence a player by SteamID even if they're offline.
```bash
css_addsilence <steamid> [time in minutes/0 perm] [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_addsilence 76561198012345678 120 "Total communication ban"
css_addsilence STEAM_1:0:12345678 0 "Permanent silence"
```
### Unsilence Player
Remove a silence from a player.
```bash
css_unsilence <steamid or name> [reason]
```
**Permission:** `@css/chat`
**Examples:**
```bash
css_unsilence PlayerName "Punishment complete"
css_unsilence 76561198012345678 "Appeal granted"
```
---
## Permission Requirements
All communication commands require the `@css/chat` permission.
| Command | Action | Offline Support |
|---------|--------|----------------|
| `css_gag` | Block text chat | No |
| `css_addgag` | Block text chat | Yes |
| `css_ungag` | Remove text block | Yes |
| `css_mute` | Block voice chat | No |
| `css_addmute` | Block voice chat | Yes |
| `css_unmute` | Remove voice block | Yes |
| `css_silence` | Block both | No |
| `css_addsilence` | Block both | Yes |
| `css_unsilence` | Remove both blocks | Yes |
---
## Communication Penalty Types
### When to Use Each Type
**Gag (Text Only):**
- Chat spam
- Advertising in chat
- Offensive messages
- Spectator camera abuse messages
**Mute (Voice Only):**
- Mic spam
- Loud music/noise
- Voice abuse
- Excessive talking
**Silence (Both):**
- Severe abuse cases
- Players who switch between chat and voice to evade
- Complete communication bans
---
## Configuration Options
### UserMessage Gag Type
In `CS2-SimpleAdmin.json`:
```json
"UserMessageGagChatType": false
```
**Options:**
- `false` - Standard gag implementation (default)
- `true` - Alternative gag using UserMessage system
**Note:** Try switching this if gag commands don't work as expected.
### Notify Penalties on Connect
```json
"NotifyPenaltiesToAdminOnConnect": true
```
When enabled, admins see active communication penalties when they join:
```
[CS2-SimpleAdmin] PlayerName is gagged (30 minutes remaining)
[CS2-SimpleAdmin] PlayerName is muted (1 hour remaining)
```
---
## Checking Penalties
### View Own Penalties
Players can check their own communication penalties:
```bash
css_penalties
css_mypenalties
css_comms
```
Shows:
- Active gags, mutes, and silences
- Duration remaining
- Reason for penalty
- Admin who issued it
### Admin View of Penalties
Use the admin menu or player info command:
```bash
css_who <#userid or name>
```
Shows complete penalty history including communication restrictions.
---
## Time Durations
Common duration values:
| Duration | Minutes | Use Case |
|----------|---------|----------|
| 1 minute | 1 | Quick warning |
| 5 minutes | 5 | Minor spam |
| 15 minutes | 15 | Standard timeout |
| 30 minutes | 30 | Repeated offense |
| 1 hour | 60 | Moderate abuse |
| 6 hours | 360 | Serious abuse |
| 1 day | 1440 | Severe abuse |
| 1 week | 10080 | Extreme cases |
| Permanent | 0 | Reserved for worst cases |
---
## Player Targeting
All communication commands support advanced targeting:
- `@all` - Target all players
- `@ct` - Target all Counter-Terrorists
- `@t` - Target all Terrorists
- `@spec` - Target all spectators
- `#123` - Target by userid
- `PlayerName` - Target by name
**Examples:**
```bash
css_gag @all 1 "Quiet for one minute"
css_mute @t 5 "T team voice timeout"
css_silence @ct 10 "CT team complete silence"
```
---
## Best Practices
### Communication Management
1. **Start with warnings** - Not all chat issues need immediate gag
2. **Use appropriate durations** - Match severity to punishment
3. **Provide reasons** - Helps players understand what they did wrong
4. **Consider silence carefully** - Complete communication ban is harsh
### Gag vs Mute vs Silence
**Progressive Approach:**
1. Verbal warning
2. Gag or mute (specific to offense)
3. Longer gag/mute for repeat offense
4. Silence for continued abuse
5. Temporary ban for extreme cases
### Documentation
1. **Always provide reasons** - Required for appeals
2. **Be specific** - "Mic spam" not just "abuse"
3. **Keep records** - Use admin logs for repeat offenders
---
## Discord Integration
Communication penalties can send Discord notifications when configured:
```json
"DiscordPenaltyGagSettings": [...],
"DiscordPenaltyMuteSettings": [...],
"DiscordPenaltySilenceSettings": [...]
```
Notifications include:
- Player name and SteamID
- Penalty type and duration
- Reason provided
- Admin who issued it
---
## Troubleshooting
### Gag doesn't work
**Try:**
1. Switch `UserMessageGagChatType` in config
2. Ensure player is actually gagged (check with `css_who`)
3. Check for conflicting plugins
### Mute doesn't block voice
**Check:**
- Is sv_talk_enemy_dead configured correctly?
- Are there voice management plugins conflicting?
- Check server console for errors
### Penalties not persistent across maps
**Solution:**
- Penalties should persist automatically
- Check database connection
- Verify MultiServerMode if using multiple servers
### Player can't see their penalties
**Check:**
- Command aliases in Commands.json
- Ensure `css_penalties` is enabled
- Check player chat permissions
---
## Related Commands
- **[Ban Commands](basebans)** - For more serious offenses
- **[Player Commands](playercommands)** - Kick, team switch
- **[Base Commands](basecommands)** - Admin management

View File

@@ -0,0 +1,436 @@
---
sidebar_position: 6
---
# Vote Commands
Commands for creating polls and votes on your server.
## Create Vote
Create a custom poll for players to vote on.
```bash
css_vote <question> [option1] [option2] [option3] ...
```
**Permission:** `@css/generic`
**Parameters:**
- `question` - The question to ask players
- `option1, option2, ...` - Vote options (at least 2 required)
---
## Examples
### Simple Yes/No Vote
```bash
css_vote "Should we change map?" "Yes" "No"
```
**Player sees:**
```
Vote: Should we change map?
1. Yes
2. No
```
---
### Multiple Options
```bash
css_vote "Which map should we play next?" "de_dust2" "de_mirage" "de_inferno" "de_nuke"
```
**Player sees:**
```
Vote: Which map should we play next?
1. de_dust2
2. de_mirage
3. de_inferno
4. de_nuke
```
---
### Rule Vote
```bash
css_vote "Should we allow AWPs?" "Yes" "No" "Only one per team"
```
---
### Activity Vote
```bash
css_vote "What should we do?" "Surf" "Deathrun" "Competitive" "Fun Round"
```
---
## How Voting Works
### Player Participation
Players vote by:
1. Opening their chat
2. Typing the number of their choice
3. Or using vote menu (if available)
**Example:**
```
Player: 1 (votes for option 1)
Player: 2 (votes for option 2)
```
### Vote Duration
- Default vote time: ~30 seconds
- Vote timer shows on screen
- Results shown when vote ends
### Vote Results
After voting ends, results are displayed:
```
Vote Results:
1. Yes - 12 votes (60%)
2. No - 8 votes (40%)
Winner: Yes
```
---
## Use Cases
### Map Voting
```bash
css_vote "Next map?" "de_dust2" "de_mirage" "de_inferno"
```
### Rule Changes
```bash
css_vote "Enable friendly fire?" "Yes" "No"
css_vote "Restart round?" "Yes" "No"
```
### Player Punishment
```bash
css_vote "Ban PlayerName for cheating?" "Yes" "No"
css_vote "Kick AFK player?" "Yes" "No"
```
### Fun Rounds
```bash
css_vote "Fun round type?" "Knife only" "Deagle only" "Zeus only" "Normal"
```
### Server Settings
```bash
css_vote "Round time?" "2 minutes" "3 minutes" "5 minutes"
css_vote "Max players?" "10v10" "5v5" "7v7"
```
---
## Best Practices
### Question Clarity
**Good Questions:**
- Clear and concise
- Specific
- Easy to understand
**Examples:**
```bash
✅ css_vote "Change to de_dust2?" "Yes" "No"
❌ css_vote "Map?" "Yes" "No" # Unclear what map
✅ css_vote "Restart this round?" "Yes" "No"
❌ css_vote "Restart?" "Yes" "No" # Restart what?
```
### Option Limits
**Recommendations:**
- 2-5 options ideal
- Too many options confuse players
- Keep options brief
**Examples:**
```bash
✅ css_vote "Next map?" "dust2" "mirage" "inferno"
❌ css_vote "Next map?" "de_dust2" "de_mirage" "de_inferno" "de_nuke" "de_vertigo" "de_ancient" "de_anubis"
```
### Timing
**When to use votes:**
- End of round
- Between maps
- During downtime
- Not during active gameplay
**When NOT to use votes:**
- Mid-round
- During clutch situations
- Too frequently
### Vote Spam Prevention
Don't spam votes:
```bash
❌ Multiple votes in quick succession
❌ Overlapping votes
❌ Votes every round
```
Wait for current vote to finish before starting another.
---
## Vote Types
### Administrative Votes
**Map change:**
```bash
css_vote "Change map now?" "Yes" "No"
```
**Server restart:**
```bash
css_vote "Restart server?" "Yes" "No"
```
**Rule enforcement:**
```bash
css_vote "Kick PlayerName?" "Yes" "No"
```
### Gameplay Votes
**Weapon restrictions:**
```bash
css_vote "Disable AWP?" "Yes" "No"
```
**Team scramble:**
```bash
css_vote "Scramble teams?" "Yes" "No"
```
**Round rules:**
```bash
css_vote "Knife round first?" "Yes" "No"
```
### Event Votes
**Tournament:**
```bash
css_vote "Start tournament?" "Yes, start now" "Wait 5 minutes" "No, cancel"
```
**Custom game mode:**
```bash
css_vote "Game mode?" "Hide and Seek" "Gungame" "Surf" "Normal"
```
---
## Limitations
### Technical Limits
- Maximum ~10 options (depends on menu system)
- One vote at a time
- Requires active players to participate
### Permission Required
Only admins with `@css/generic` permission can start votes.
To grant permission:
```bash
css_addadmin STEAMID "Name" "@css/generic" 50 0
```
---
## Vote Results Handling
### Manual Enforcement
Votes don't automatically execute actions. Admins must:
1. **See the results**
2. **Manually execute the winning option**
**Example:**
```bash
# Start vote
css_vote "Change to de_dust2?" "Yes" "No"
# If "Yes" wins, manually change map
css_map de_dust2
```
### Why Manual?
- Prevents abuse
- Allows admin oversight
- Gives control over execution
---
## Advanced Usage
### Combining with Commands
Use votes to decide, then execute:
```bash
# Vote on map
css_vote "Next map?" "dust2" "mirage" "inferno"
# If dust2 wins:
css_map de_dust2
# Vote on player kick
css_vote "Kick PlayerName?" "Yes" "No"
# If Yes wins:
css_kick PlayerName "Voted to be kicked"
```
### Sequential Votes
Run multiple votes for complex decisions:
```bash
# First vote: Mode
css_vote "Game mode?" "Competitive" "Casual"
# If Competitive wins, second vote:
css_vote "Round time?" "2 min" "3 min" "5 min"
```
---
## Configuration
Check if vote commands are enabled in:
```
addons/counterstrikesharp/configs/plugins/CS2-SimpleAdmin/Commands.json
```
```json
{
"Commands": {
"css_vote": {
"Aliases": [
"css_vote"
]
}
}
}
```
To disable votes, remove all aliases:
```json
{
"Commands": {
"css_vote": {
"Aliases": []
}
}
}
```
---
## Troubleshooting
### Vote doesn't start
**Check:**
- Do you have `@css/generic` permission?
- Is command enabled in Commands.json?
- Are there at least 2 options?
### Players can't vote
**Check:**
- Vote menu is showing
- Players know how to vote (type number in chat)
- Vote hasn't already ended
### Vote results not showing
**Check:**
- Wait for vote to complete
- Check server console
- Ensure voting system is working
---
## Permission Requirements
| Command | Permission | Description |
|---------|------------|-------------|
| `css_vote` | `@css/generic` | Create votes/polls |
---
## Tips
### Effective Polling
1. **Ask clear questions** - No ambiguity
2. **Limit options** - 2-4 is ideal
3. **Time it right** - Between rounds
4. **Follow through** - Execute winning option
5. **Don't overuse** - Votes lose impact if spammed
### Community Engagement
Use votes to:
- Involve community in decisions
- Gauge player preferences
- Create democratic server atmosphere
- Get feedback on changes
### Example Scenarios
**New map test:**
```bash
css_vote "Try new map cs_office?" "Yes" "No"
```
**Event planning:**
```bash
css_vote "Tournament this weekend?" "Saturday" "Sunday" "No thanks"
```
**Rule feedback:**
```bash
css_vote "Keep no-AWP rule?" "Yes" "No" "Only limit to 2"
```
---
## Related Commands
- **[Base Commands](basecommands)** - Server management
- **[Chat Commands](basechat)** - Announcements
- **[Player Commands](playercommands)** - Player actions

View File

@@ -0,0 +1,516 @@
---
sidebar_position: 5
---
# Player Commands
Commands for managing and manipulating players on your server.
:::note
Many of these commands are included in the base plugin. For extended fun commands (god mode, noclip, freeze, etc.), see the [Fun Commands Module](../../modules/funcommands).
:::
## Player Management
### Slay Player
Kill a player instantly.
```bash
css_slay <#userid or name>
```
**Permission:** `@css/slay`
**Examples:**
```bash
css_slay #123
css_slay PlayerName
css_slay @ct # Slay all CTs
css_slay @t # Slay all terrorists
```
**Use cases:**
- Punishment for rule breaking
- Ending rounds quickly
- Removing camping players
---
### Slap Player
Slap a player, dealing damage and pushing them.
```bash
css_slap <#userid or name> [damage]
```
**Permission:** `@css/slay`
**Parameters:**
- `damage` - HP damage to deal (default: 0)
**Examples:**
```bash
css_slap #123 # Slap with no damage
css_slap PlayerName 10 # Slap for 10 HP damage
css_slap @all 5 # Slap everyone for 5 damage
```
**Effects:**
- Player is pushed in a random direction
- Optional damage dealt
- Makes slap sound
**Use cases:**
- Funny punishment
- Getting player attention
- Moving AFK players
---
## Player Attributes
### Set Player Health
Set a player's health points.
```bash
css_hp <#userid or name> <health>
```
**Permission:** `@css/slay`
**Examples:**
```bash
css_hp #123 100 # Set to full health
css_hp PlayerName 1 # Set to 1 HP
css_hp @ct 200 # Give all CTs 200 HP
```
**Valid range:** 1 - 999+
---
### Set Player Speed
Modify a player's movement speed.
```bash
css_speed <#userid or name> <speed>
```
**Permission:** `@css/slay`
**Parameters:**
- `speed` - Speed multiplier (1.0 = normal, 2.0 = double speed, 0.5 = half speed)
**Examples:**
```bash
css_speed #123 1.5 # 150% speed
css_speed PlayerName 0.5 # 50% speed (slow motion)
css_speed @all 2.0 # Double speed for everyone
css_speed #123 1.0 # Reset to normal speed
```
**Common values:**
- `0.5` - Slow motion
- `1.0` - Normal (default)
- `1.5` - Fast
- `2.0` - Very fast
- `3.0` - Extremely fast
**Note:** Speed persists across respawns until reset.
---
### Set Player Gravity
Modify a player's gravity.
```bash
css_gravity <#userid or name> <gravity>
```
**Permission:** `@css/slay`
**Parameters:**
- `gravity` - Gravity multiplier (1.0 = normal, 0.5 = moon jump, 2.0 = heavy)
**Examples:**
```bash
css_gravity #123 0.5 # Moon jump
css_gravity PlayerName 2.0 # Heavy gravity
css_gravity @all 0.1 # Super jump for everyone
css_gravity #123 1.0 # Reset to normal
```
**Common values:**
- `0.1` - Super high jumps
- `0.5` - Moon gravity
- `1.0` - Normal (default)
- `2.0` - Heavy/fast falling
**Note:** Gravity persists across respawns until reset.
---
### Set Player Money
Set a player's money amount.
```bash
css_money <#userid or name> <amount>
```
**Permission:** `@css/slay`
**Examples:**
```bash
css_money #123 16000 # Max money
css_money PlayerName 0 # Remove all money
css_money @ct 10000 # Give all CTs $10,000
```
**Valid range:** 0 - 65535 (CS2 engine limit)
---
## Team Management
### Switch Player Team
Move a player to a different team.
```bash
css_team <#userid or name> [ct/t/spec] [-k]
```
**Permission:** `@css/kick`
**Parameters:**
- `ct` - Counter-Terrorist team
- `t` - Terrorist team
- `spec` - Spectators
- `-k` - Kill player during switch (optional)
**Examples:**
```bash
css_team #123 ct # Move to CT
css_team PlayerName t # Move to T
css_team @spec t # Move all spectators to T
css_team #123 ct -k # Move to CT and kill
```
**Configuration:**
```json
"TeamSwitchType": 1
```
Determines team switch behavior.
---
### Rename Player
Temporarily rename a player.
```bash
css_rename <#userid or name> <new name>
```
**Permission:** `@css/kick`
**Examples:**
```bash
css_rename #123 "NewName"
css_rename PlayerName "RenamedPlayer"
css_rename @all "Everyone"
```
**Notes:**
- Rename is temporary (resets on reconnect)
- For permanent rename, use `css_prename`
---
### Permanent Rename
Permanently force a player's name.
```bash
css_prename <#userid or name> <new name>
```
**Permission:** `@css/ban`
**Examples:**
```bash
css_prename #123 "EnforcedName"
css_prename PlayerName "NewIdentity"
```
**Notes:**
- Name is enforced even after reconnect
- Stored in database
- Player cannot change it
- Useful for offensive names
---
## Weapon Management
### Give Weapon
Give a weapon to a player.
```bash
css_give <#userid or name> <weapon>
```
**Permission:** `@css/cheats`
**Weapon names:**
- Rifles: `ak47`, `m4a1`, `m4a1_silencer`, `aug`, `sg556`, `awp`
- SMGs: `mp5sd`, `mp7`, `mp9`, `p90`, `ump45`
- Heavy: `nova`, `xm1014`, `mag7`, `m249`, `negev`
- Pistols: `deagle`, `elite`, `fiveseven`, `glock`, `hkp2000`, `p250`, `tec9`, `usp_silencer`
- Grenades: `flashbang`, `hegrenade`, `smokegrenade`, `molotov`, `incgrenade`, `decoy`
- Equipment: `kevlar`, `assaultsuit`, `defuser`, `knife`
**Examples:**
```bash
css_give #123 awp
css_give PlayerName ak47
css_give @ct m4a1
css_give @all deagle
```
---
### Strip Weapons
Remove all weapons from a player.
```bash
css_strip <#userid or name>
```
**Permission:** `@css/slay`
**Examples:**
```bash
css_strip #123
css_strip PlayerName
css_strip @t # Disarm all terrorists
```
**Effects:**
- Removes all weapons
- Leaves player with knife only
- Removes grenades and equipment
---
## Teleportation
### Teleport to Player
Teleport yourself to another player.
```bash
css_tp <#userid or name>
css_tpto <#userid or name>
css_goto <#userid or name>
```
**Permission:** `@css/kick`
**Examples:**
```bash
css_tp #123
css_goto PlayerName
```
**Use cases:**
- Checking player behavior
- Admin help
- Spectating suspicious players
---
### Teleport Player to You
Bring a player to your location.
```bash
css_bring <#userid or name>
css_tphere <#userid or name>
```
**Permission:** `@css/kick`
**Examples:**
```bash
css_bring #123
css_tphere PlayerName
css_bring @all # Bring everyone to you
```
**Use cases:**
- Moving stuck players
- Gathering players
- Admin events
---
### Respawn Player
Respawn a dead player.
```bash
css_respawn <#userid or name>
```
**Permission:** `@css/cheats`
**Examples:**
```bash
css_respawn #123
css_respawn PlayerName
css_respawn @ct # Respawn all dead CTs
```
**Notes:**
- Player spawns at spawn point
- Equipped with default weapons
- Can break competitive balance
---
## Player Targeting
All player commands support advanced targeting:
### Target Syntax
- `@all` - All players
- `@ct` - All Counter-Terrorists
- `@t` - All Terrorists
- `@spec` - All spectators
- `@alive` - All alive players
- `@dead` - All dead players
- `@bot` - All bots
- `@human` - All human players
- `@me` - Yourself
- `#123` - Specific user ID
- `PlayerName` - By name (partial match supported)
### Multiple Targets
```bash
css_slay @ct # Kills all CTs
css_hp @all 200 # Give everyone 200 HP
css_speed @t 2.0 # Make all Ts fast
```
---
## Permission Requirements
| Command | Required Permission | Description |
|---------|-------------------|-------------|
| `css_slay` | `@css/slay` | Kill players |
| `css_slap` | `@css/slay` | Slap players |
| `css_hp` | `@css/slay` | Set health |
| `css_speed` | `@css/slay` | Modify speed |
| `css_gravity` | `@css/slay` | Modify gravity |
| `css_money` | `@css/slay` | Set money |
| `css_team` | `@css/kick` | Change team |
| `css_rename` | `@css/kick` | Temporary rename |
| `css_prename` | `@css/ban` | Permanent rename |
| `css_give` | `@css/cheats` | Give weapons |
| `css_strip` | `@css/slay` | Remove weapons |
| `css_tp` | `@css/kick` | Teleport to player |
| `css_bring` | `@css/kick` | Bring player |
| `css_respawn` | `@css/cheats` | Respawn players |
---
## Best Practices
### Punishment Commands
**Slay:**
- Use for rule violations
- Better than kick for minor issues
- Allows player to stay and learn
**Slap:**
- Lighter punishment
- Good for warnings
- Can be funny/entertaining
### Gameplay Modification
**HP/Speed/Gravity:**
- Use for events/fun rounds
- Don't abuse during competitive play
- Reset to normal after use
**Respawn:**
- Very disruptive to gameplay
- Use sparingly
- Good for fixing bugs/mistakes
### Team Management
**Team switching:**
- Balance teams fairly
- Don't abuse for winning
- Use `-k` flag for competitive integrity
---
## Configuration
### Team Switch Behavior
```json
"TeamSwitchType": 1
```
Controls how team switching works.
---
## Troubleshooting
### Speed/Gravity not persisting
**Solution:** These are maintained by a timer. If they reset:
- Check server console for errors
- Ensure plugin is loaded correctly
- Try reapplying the modification
### Can't teleport
**Check:**
- Target player is connected
- You have correct permissions
- Both players are valid
### Give weapon not working
**Check:**
- Weapon name is correct
- Player is alive
- Player has inventory space
---
## Related Commands
- **[Fun Commands Module](../../modules/funcommands)** - Extended fun commands (freeze, god mode, noclip)
- **[Ban Commands](basebans)** - Punishment commands
- **[Base Commands](basecommands)** - Server management

View File

@@ -0,0 +1,397 @@
---
sidebar_position: 3
---
# Configuration
Learn how to configure CS2-SimpleAdmin to suit your server's needs.
## Configuration File Location
The main configuration file is located at:
```
addons/counterstrikesharp/configs/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.json
```
## Configuration Structure
The configuration file is divided into several sections:
### Database Configuration
Configure your database connection:
```json
"DatabaseConfig": {
"DatabaseType": "SQLite",
"SqliteFilePath": "cs2-simpleadmin.sqlite",
"DatabaseHost": "",
"DatabasePort": 3306,
"DatabaseUser": "",
"DatabasePassword": "",
"DatabaseName": "",
"DatabaseSSlMode": "preferred"
}
```
**Database Types:**
- `SQLite` - Local database file (good for single server)
- `MySQL` - MySQL/MariaDB server (required for multi-server setups)
**MySQL Example:**
```json
"DatabaseConfig": {
"DatabaseType": "MySQL",
"DatabaseHost": "localhost",
"DatabasePort": 3306,
"DatabaseUser": "cs2admin",
"DatabasePassword": "your_password",
"DatabaseName": "cs2_simpleadmin",
"DatabaseSSlMode": "preferred"
}
```
### Other Settings
General plugin settings:
```json
"OtherSettings": {
"ShowActivityType": 2,
"TeamSwitchType": 1,
"KickTime": 5,
"BanType": 1,
"TimeMode": 1,
"DisableDangerousCommands": true,
"MaxBanDuration": 10080,
"MaxMuteDuration": 10080,
"ExpireOldIpBans": 0,
"ReloadAdminsEveryMapChange": false,
"DisconnectedPlayersHistoryCount": 10,
"NotifyPenaltiesToAdminOnConnect": true,
"ShowBanMenuIfNoTime": true,
"UserMessageGagChatType": false,
"CheckMultiAccountsByIp": true,
"AdditionalCommandsToLog": [],
"IgnoredIps": []
}
```
**Settings Explained:**
| Setting | Description | Default |
|---------|-------------|---------|
| `ShowActivityType` | How to display admin actions (0=hide, 1=anonymous, 2=show name) | 2 |
| `TeamSwitchType` | Team switch behavior | 1 |
| `KickTime` | Delay before kicking player (seconds) | 5 |
| `BanType` | Ban type (1=SteamID, 2=IP, 3=Both) | 1 |
| `TimeMode` | Time display mode | 1 |
| `DisableDangerousCommands` | Disable potentially dangerous commands | true |
| `MaxBanDuration` | Maximum ban duration in minutes (0=unlimited) | 10080 |
| `MaxMuteDuration` | Maximum mute duration in minutes (0=unlimited) | 10080 |
| `ExpireOldIpBans` | Auto-expire IP bans after X days (0=disabled) | 0 |
| `ReloadAdminsEveryMapChange` | Reload admin permissions on map change | false |
| `DisconnectedPlayersHistoryCount` | Number of disconnected players to track | 10 |
| `NotifyPenaltiesToAdminOnConnect` | Show penalties to admins when they connect | true |
| `ShowBanMenuIfNoTime` | Show ban menu even without time parameter | true |
| `UserMessageGagChatType` | Use UserMessage for gag (alternative chat blocking) | false |
| `CheckMultiAccountsByIp` | Detect multiple accounts from same IP | true |
| `AdditionalCommandsToLog` | Array of additional commands to log | [] |
| `IgnoredIps` | IPs to ignore in multi-account detection | [] |
### Metrics and Updates
```json
"EnableMetrics": true,
"EnableUpdateCheck": true
```
- `EnableMetrics` - Send anonymous usage statistics
- `EnableUpdateCheck` - Check for plugin updates on load
### Timezone
Set your server's timezone for accurate timestamps:
```json
"Timezone": "UTC"
```
See the [list of timezones](#timezone-list) below.
### Warning Thresholds
Configure automatic actions when players reach warning thresholds:
```json
"WarnThreshold": {
"998": "css_addban STEAMID64 60 \"3/4 Warn\"",
"999": "css_ban #USERID 120 \"4/4 Warn\""
}
```
**Example:** Automatically ban a player for 60 minutes when they receive their 3rd warning.
### Multi-Server Mode
Enable if you're running multiple servers with a shared database:
```json
"MultiServerMode": true
```
When enabled:
- Bans are shared across all servers
- Admin permissions can be global or server-specific
- Player data is synchronized
### Discord Integration
Send notifications to Discord webhooks:
```json
"Discord": {
"DiscordLogWebhook": "https://discord.com/api/webhooks/...",
"DiscordPenaltyBanSettings": [...],
"DiscordPenaltyMuteSettings": [...],
"DiscordPenaltyGagSettings": [...],
"DiscordPenaltySilenceSettings": [...],
"DiscordPenaltyWarnSettings": [...],
"DiscordAssociatedAccountsSettings": [...]
}
```
**Webhook Settings:**
Each penalty type can have its own webhook configuration:
```json
"DiscordPenaltyBanSettings": [
{
"name": "Color",
"value": "#FF0000"
},
{
"name": "Webhook",
"value": "https://discord.com/api/webhooks/YOUR_WEBHOOK_HERE"
},
{
"name": "ThumbnailUrl",
"value": "https://example.com/ban-icon.png"
},
{
"name": "ImageUrl",
"value": ""
},
{
"name": "Footer",
"value": "CS2-SimpleAdmin"
},
{
"name": "Time",
"value": "{relative}"
}
]
```
**Available Placeholders:**
- `{relative}` - Relative timestamp
- `{fixed}` - Fixed timestamp
### Map Configuration
Configure default maps and workshop maps:
```json
"DefaultMaps": [
"de_dust2",
"de_mirage",
"de_inferno"
],
"WorkshopMaps": {
"aim_map": "123456789",
"surf_map": "987654321"
}
```
### Custom Server Commands
Add custom commands to the admin menu:
```json
"CustomServerCommands": [
{
"Flag": "@css/root",
"DisplayName": "Reload Admins",
"Command": "css_reloadadmins"
},
{
"Flag": "@css/cheats",
"DisplayName": "Enable sv_cheats",
"Command": "sv_cheats 1"
}
]
```
### Menu Configuration
Configure menu appearance and options:
```json
"MenuConfig": {
"MenuType": "selectable",
"Durations": [
{ "name": "1 minute", "duration": 1 },
{ "name": "5 minutes", "duration": 5 },
{ "name": "15 minutes", "duration": 15 },
{ "name": "1 hour", "duration": 60 },
{ "name": "1 day", "duration": 1440 },
{ "name": "7 days", "duration": 10080 },
{ "name": "14 days", "duration": 20160 },
{ "name": "30 days", "duration": 43200 },
{ "name": "Permanent", "duration": 0 }
],
"BanReasons": [
"Hacking",
"Voice Abuse",
"Chat Abuse",
"Admin disrespect",
"Other"
],
"KickReasons": [
"Voice Abuse",
"Chat Abuse",
"Admin disrespect",
"Other"
],
"WarnReasons": [
"Voice Abuse",
"Chat Abuse",
"Admin disrespect",
"Other"
],
"MuteReasons": [
"Advertising",
"Spamming",
"Spectator camera abuse",
"Hate",
"Admin disrespect",
"Other"
],
"AdminFlags": [
{ "name": "Generic", "flag": "@css/generic" },
{ "name": "Chat", "flag": "@css/chat" },
{ "name": "Change Map", "flag": "@css/changemap" },
{ "name": "Slay", "flag": "@css/slay" },
{ "name": "Kick", "flag": "@css/kick" },
{ "name": "Ban", "flag": "@css/ban" },
{ "name": "Perm Ban", "flag": "@css/permban" },
{ "name": "Unban", "flag": "@css/unban" },
{ "name": "Show IP", "flag": "@css/showip" },
{ "name": "Cvar", "flag": "@css/cvar" },
{ "name": "Rcon", "flag": "@css/rcon" },
{ "name": "Root (all flags)", "flag": "@css/root" }
]
}
```
## Timezone List
<details>
<summary>Click to expand timezone list</summary>
```
UTC
America/New_York
America/Chicago
America/Denver
America/Los_Angeles
Europe/London
Europe/Paris
Europe/Berlin
Europe/Warsaw
Europe/Moscow
Asia/Tokyo
Asia/Shanghai
Asia/Dubai
Australia/Sydney
Pacific/Auckland
... (and many more)
```
For a complete list, see the info.txt file in the documentation folder.
</details>
## Commands Configuration
You can customize command aliases in:
```
addons/counterstrikesharp/configs/plugins/CS2-SimpleAdmin/Commands.json
```
Example:
```json
{
"Commands": {
"css_ban": {
"Aliases": [
"css_ban",
"css_ban2"
]
}
}
}
```
This allows you to:
- **Disable commands** - Remove all aliases from the array
- **Add aliases** - Add multiple command variations
- **Rename commands** - Change the command name while keeping functionality
## Best Practices
### Security
1. **Use MySQL in production** - SQLite is not suitable for multi-server setups
2. **Set MaxBanDuration** - Prevent accidental permanent bans
3. **Enable DisableDangerousCommands** - Protect against accidental server crashes
4. **Use strong database passwords** - If using MySQL
### Performance
1. **Set ReloadAdminsEveryMapChange to false** - Unless you frequently modify admin permissions
2. **Limit DisconnectedPlayersHistoryCount** - Reduce memory usage
3. **Use database indices** - Migrations create these automatically
### Multi-Server Setup
1. **Enable MultiServerMode** - Share data across servers
2. **Use MySQL** - Required for multi-server
3. **Configure server IDs** - Each server gets a unique ID automatically
4. **Test penalties** - Ensure bans work across all servers
## Troubleshooting
### Changes not taking effect
**Solution:** Reload the plugin or restart the server:
```
css_plugins reload CS2-SimpleAdmin
```
### Discord webhooks not working
**Solution:**
- Verify webhook URL is correct
- Check that the webhook is not deleted in Discord
- Ensure server has internet access
### TimeMode issues
**Solution:** Set your timezone correctly in the configuration
## Next Steps
- **[Learn admin commands](commands/basebans)** - Browse available commands
- **[Set up admins](#)** - Add your admin team
- **[Configure modules](../modules/intro)** - Extend functionality

View File

@@ -0,0 +1,188 @@
---
sidebar_position: 2
---
# Installation
This guide will help you install CS2-SimpleAdmin on your Counter-Strike 2 server.
## Prerequisites
Before installing CS2-SimpleAdmin, ensure you have the following dependencies installed:
### Required Dependencies
1. **[CounterStrikeSharp](https://github.com/roflmuffin/CounterStrikeSharp/)** (v1.0.340+)
- The core framework for CS2 server plugins
2. **[AnyBaseLibCS2](https://github.com/NickFox007/AnyBaseLibCS2)**
- Required by PlayerSettings
3. **[PlayerSettings](https://github.com/NickFox007/PlayerSettingsCS2)**
- Required by MenuManager
4. **[MenuManagerCS2](https://github.com/NickFox007/MenuManagerCS2)**
- Provides the menu system
### Database Requirements
You'll need either:
- **MySQL** server (recommended for production)
- **SQLite** (built-in, good for testing)
## Installation Steps
### 1. Download the Plugin
Download the latest release from the [GitHub Releases page](https://github.com/daffyyyy/CS2-SimpleAdmin/releases).
You can either:
- Download the pre-built release ZIP file
- Clone the repository and build from source
### 2. Extract Files
Extract the downloaded files to your server's CounterStrikeSharp directory:
```
game/csgo/addons/counterstrikesharp/plugins/CS2-SimpleAdmin/
```
Your directory structure should look like this:
```
csgo/
└── addons/
└── counterstrikesharp/
├── plugins/
│ └── CS2-SimpleAdmin/
│ ├── CS2-SimpleAdmin.dll
│ ├── lang/
│ └── ... (other files)
└── shared/
└── CS2-SimpleAdminApi/
└── CS2-SimpleAdminApi.dll
```
### 3. First Launch
Start your server. On the first launch, CS2-SimpleAdmin will:
1. Create a configuration file at:
```
addons/counterstrikesharp/configs/plugins/CS2-SimpleAdmin/CS2-SimpleAdmin.json
```
2. Create a database (if using SQLite):
```
addons/counterstrikesharp/plugins/CS2-SimpleAdmin/cs2-simpleadmin.sqlite
```
3. Apply database migrations automatically
### 4. Configure the Plugin
Edit the generated configuration file to match your server setup.
See the [Configuration Guide](configuration) for detailed information.
### 5. Restart Your Server
After editing the configuration, restart your server or reload the plugin:
```bash
css_plugins reload CS2-SimpleAdmin
```
## Building from Source
If you want to build CS2-SimpleAdmin from source:
### Prerequisites
- .NET 8.0 SDK
- Git
### Build Steps
1. **Clone the repository:**
```bash
git clone https://github.com/daffyyyy/CS2-SimpleAdmin.git
cd CS2-SimpleAdmin
```
2. **Restore dependencies:**
```bash
dotnet restore CS2-SimpleAdmin.sln
```
3. **Build the solution:**
```bash
dotnet build CS2-SimpleAdmin.sln -c Release
```
4. **Build output location:**
```
CS2-SimpleAdmin/bin/Release/net8.0/
CS2-SimpleAdminApi/bin/Release/net8.0/
```
5. **Copy to server:**
- Copy `CS2-SimpleAdmin.dll` and its dependencies to `plugins/CS2-SimpleAdmin/`
- Copy `CS2-SimpleAdminApi.dll` to `shared/CS2-SimpleAdminApi/`
## Verification
To verify the installation was successful:
1. **Check server console** for the plugin load message:
```
[CS2-SimpleAdmin] Plugin loaded successfully
```
2. **Run an admin command** in-game:
```
css_admin
```
3. **Check the logs** at:
```
addons/counterstrikesharp/logs/CS2-SimpleAdmin*.txt
```
## Troubleshooting
### Plugin doesn't load
**Solution:** Ensure all required dependencies are installed:
- CounterStrikeSharp (latest version)
- AnyBaseLibCS2
- PlayerSettings
- MenuManagerCS2
### Database connection errors
**Solution:**
- For MySQL: Verify database credentials in the config file
- For SQLite: Ensure the plugin has write permissions in its directory
### Commands not working
**Solution:**
- Check that you have admin permissions configured
- Verify the commands are enabled in `Commands.json`
- Check server console for error messages
## Next Steps
- **[Configure your plugin](configuration)** - Set up database, permissions, and features
- **[Learn the commands](commands/basebans)** - Browse available admin commands
- **[Add admins](#)** - Set up your admin team
## Need Help?
If you encounter issues:
1. Check the [GitHub Issues](https://github.com/daffyyyy/CS2-SimpleAdmin/issues) for similar problems
2. Review server logs for error messages
3. Ask for help on [GitHub Discussions](https://github.com/daffyyyy/CS2-SimpleAdmin/discussions)

View File

@@ -0,0 +1,81 @@
---
sidebar_position: 1
---
# Introduction
Welcome to **CS2-SimpleAdmin** - a comprehensive administration plugin for Counter-Strike 2 servers built with C# (.NET 8.0) for CounterStrikeSharp.
## What is CS2-SimpleAdmin?
CS2-SimpleAdmin is a powerful server administration tool that provides comprehensive features for managing your Counter-Strike 2 server. It offers:
- **Player Management** - Ban, kick, mute, gag, and warn players
- **Admin System** - Flexible permission system with flags and groups
- **Multi-Server Support** - Manage multiple servers with a shared database
- **Discord Integration** - Send notifications to Discord webhooks
- **Menu System** - Easy-to-use admin menus
- **Extensive Commands** - Over 50 admin commands
- **Module Support** - Extend functionality with custom modules
## Key Features
### 🛡️ Comprehensive Penalty System
- **Bans** - Ban players by SteamID or IP address
- **Mutes** - Mute voice communication
- **Gags** - Gag text chat
- **Silence** - Block both voice and text
- **Warnings** - Progressive warning system with auto-escalation
### 👥 Flexible Admin System
- Permission-based access control using flags
- Admin groups for easy management
- Immunity levels to prevent abuse
- Server-specific or global admin assignments
### 🗄️ Database Support
- **MySQL** - For production environments
- **SQLite** - For quick setup and testing
- Automatic migration system
- Multi-server mode with shared data
### 🎮 User-Friendly Interface
- Interactive admin menus
- In-game admin panel
- Player selection menus
- Duration and reason selection
### 🔧 Extensibility
- Public API for module development
- Event system for custom integrations
- Command registration system
- Menu builder API
## Requirements
Before installing CS2-SimpleAdmin, make sure you have:
- [CounterStrikeSharp](https://github.com/roflmuffin/CounterStrikeSharp/) (v1.0.340+)
- [AnyBaseLibCS2](https://github.com/NickFox007/AnyBaseLibCS2)
- [PlayerSettings](https://github.com/NickFox007/PlayerSettingsCS2)
- [MenuManagerCS2](https://github.com/NickFox007/MenuManagerCS2)
- MySQL database (or use SQLite for testing)
## Quick Links
- **[Installation Guide](installation)** - Get started with CS2-SimpleAdmin
- **[Configuration](configuration)** - Learn how to configure the plugin
- **[Commands](commands/basebans)** - Browse all available commands
- **[GitHub Repository](https://github.com/daffyyyy/CS2-SimpleAdmin)** - Source code and releases
## Community & Support
Need help or want to contribute?
- **Issues** - Report bugs on [GitHub Issues](https://github.com/daffyyyy/CS2-SimpleAdmin/issues)
- **Discussions** - Ask questions on [GitHub Discussions](https://github.com/daffyyyy/CS2-SimpleAdmin/discussions)
- **Pull Requests** - Contribute improvements
## License
CS2-SimpleAdmin is open-source software. Check the [GitHub repository](https://github.com/daffyyyy/CS2-SimpleAdmin) for license details.