You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76-42
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,17 @@
1
-
##Custom Commands Plugin
1
+
# Custom Commands Plugin Readme
2
2
3
-
Create your custom commands in ./plugins/CustomCommands/Commands.json
3
+
## Overview
4
4
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
6
8
7
9
```json
8
10
[
9
11
{
10
12
"Title": "Discord",
11
13
"Command": "discord",
12
14
"Message": "{PREFIX}{GREEN}Discord: \n <link>",
13
-
"CenterMessage": "",
14
-
"CenterMessageTime": 1,
15
-
"PrintTo": 0,
16
15
"Description": "Command for Discord"
17
16
},
18
17
{
@@ -23,54 +22,89 @@ Create your custom commands in ./plugins/CustomCommands/Commands.json
23
22
"CenterMessageTime": 2,
24
23
"PrintTo": 7,
25
24
"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
+
}
26
51
}
27
52
]
28
53
```
29
54
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
31
87
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
33
89
34
-
**Message**: The message you want to send.
90
+
### ServerCommands
35
91
36
-
Colors:
92
+
An array of server commands to be executed when the command is triggered. Useful for actions like enabling specific game modes.
37
93
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
52
95
53
-
**CenterMessage**: The Center Message. HTML works as well.
96
+
Defines if the command requires specific permissions to execute:
54
97
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)
56
102
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
67
104
68
-
**Description**: What the Description for the command should be
0 commit comments