Skip to content

Commit f12796c

Browse files
committed
Readme update
1 parent c5231c0 commit f12796c

File tree

1 file changed

+76
-42
lines changed

1 file changed

+76
-42
lines changed

README.md

Lines changed: 76 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
## Custom Commands Plugin
1+
# Custom Commands Plugin Readme
22

3-
Create your custom commands in ./plugins/CustomCommands/Commands.json
3+
## Overview
44

5-
#### Example
5+
The Custom Commands Plugin allows you to create and customize commands for your server. These commands can display messages, perform server-side actions, and more. The configuration for these commands is stored in the `Commands.json` file located in the `./plugins/CustomCommands/` directory.
6+
7+
## Example Configuration
68

79
```json
810
[
911
{
1012
"Title": "Discord",
1113
"Command": "discord",
1214
"Message": "{PREFIX}{GREEN}Discord: \n <link>",
13-
"CenterMessage": "",
14-
"CenterMessageTime": 1,
15-
"PrintTo": 0,
1615
"Description": "Command for Discord"
1716
},
1817
{
@@ -23,54 +22,89 @@ Create your custom commands in ./plugins/CustomCommands/Commands.json
2322
"CenterMessageTime": 2,
2423
"PrintTo": 7,
2524
"Description": "Command for SteamGroup"
25+
},
26+
{
27+
"Title": "Enable Surf",
28+
"Command": "surf",
29+
"Message": "Surf is now enabled",
30+
"PrintTo": 0,
31+
"Description": "Command for enabling Surf gamemode",
32+
"ServerCommands": [
33+
"sv_cheats 1",
34+
"sv_falldamage_scale 0",
35+
"sv_party_mode 1",
36+
"mp_freezetime 2.5",
37+
"mp_round_restart_delay 2.5",
38+
"cl_ragdoll_gravity 0",
39+
"sv_accelerate 10",
40+
"sv_airaccelerate 1400",
41+
"sv_gravity 800.0"
42+
],
43+
"Permission": {
44+
"RequiresPermissionOr": false,
45+
"PermissionList": [
46+
"@css/cvar",
47+
"@custom/permission",
48+
"#css/simple-admin"
49+
]
50+
}
2651
}
2752
]
2853
```
2954

30-
**Title**: Just the title for your
55+
## Configuration Details
56+
57+
### Title
58+
59+
Just the title for your command. Can be anything or empty.
60+
61+
### Command
62+
63+
Specify the commands as a string, e.g., "discord" or "steam,steamgroup,group". Players can use `!discord` or `/discord` in the chat or css_discord in the console.
64+
65+
### Message
66+
67+
The message you want to send. You can use color codes like {GREEN} for green text.
68+
69+
### CenterMessage
70+
71+
The center message. For special formating use HTML
72+
73+
### PrintTo
74+
75+
Specifies where the message should be shown:
76+
77+
- **0**: Client Chat
78+
- **1**: All Chat
79+
- **2**: Client Center
80+
- **3**: All Center
81+
- **4**: Client Chat & Client Center
82+
- **5**: Client Chat & All Center
83+
- **6**: All Chat & Client Center
84+
- **7**: All Chat & All Center
85+
86+
### Description
3187

32-
**Command:** just type the name. !`<command>` and /`<command>` will work normally
88+
A description of what the command does. This will be shown when do css_help
3389

34-
**Message**: The message you want to send.
90+
### ServerCommands
3591

36-
Colors:
92+
An array of server commands to be executed when the command is triggered. Useful for actions like enabling specific game modes.
3793

38-
* {DEFAULT}
39-
* {RED}
40-
* {LIGHTPURPLE}
41-
* {GREEN}
42-
* {LIME}
43-
* {LIGHTGREEN}
44-
* {LIGHTRED}
45-
* {GRAY}
46-
* {LIGHTOLIVE}
47-
* {OLIVE}
48-
* {LIGHTBLUE}
49-
* {BLUE}
50-
* {PURPLE}
51-
* {GRAYBLUE}
94+
### Permission
5295

53-
**CenterMessage**: The Center Message. HTML works as well.
96+
Defines if the command requires specific permissions to execute:
5497

55-
**PrintTo**: Where the message should be shown
98+
- **ReguiresAllPermissions**
99+
- Set to true = The player needs all permissions in PermissionsList
100+
- Set to false = The player only needs one of the permissions in PermissionsList
101+
- **PermissionList**: A list of permission flags or groups required to execute the command. [More Explenation](https://docs.cssharp.dev/docs/admin-framework/defining-admins.html)
56102

57-
| Desc | Nr |
58-
| --------------------------- | -- |
59-
| Client Chat | 0 |
60-
| All Chat | 1 |
61-
| Client Center | 2 |
62-
| All Center | 3 |
63-
| Client Chat & Client Center | 4 |
64-
| Client Chat & All Center | 5 |
65-
| All Chat & Client Center | 6 |
66-
| All Chat & All Center | 7 |
103+
### Colorlist
67104

68-
**Description**: What the Description for the command should be
105+
{DEFAULT}, {RED}, {LIGHTPURPLE}, {GREEN}, {LIME},
106+
{LIGHTGREEN}, {LIGHTRED}, {GRAY}, {LIGHTOLIVE},
107+
{OLIVE}, {LIGHTBLUE}, {BLUE}, {PURPLE}, {GRAYBLUE}
69108

70109

71-
## Roadmap
72110

73-
* [ ] Send Server Commands
74-
* [ ] Set permissions
75-
* [ ] On Off toggle
76-
* [ ] Allow Args

0 commit comments

Comments
 (0)