From 932566a5b913f7742b8ff04550d86cff3c254fee Mon Sep 17 00:00:00 2001 From: HerrMagic Date: Sun, 6 Oct 2024 19:18:09 +0200 Subject: [PATCH 1/2] adding random number example --- Examples/Tags.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Examples/Tags.md b/Examples/Tags.md index c4f3abf..eea612c 100644 --- a/Examples/Tags.md +++ b/Examples/Tags.md @@ -5,7 +5,7 @@ Here is a list of tags you can add to the message. Its also possible to use some The tags are always in {TAG} -``` +```json [ { "Title": "Prefix", @@ -91,5 +91,13 @@ The tags are always in {TAG} "Message": "Current players userid: {USERID}", // If you want to use this tag for commands add a # before the tag "PrintTo": 0 } + }, + { + "Title": "Random number", + "Description": "Displays a random number", + "Command": "random", + "Message": "This is a random number: {RNDNO=(10,20)}", // This generates a random number between 10 and 20 + "PrintTo": 0 + } ] ``` From 5ae77655ae22e81f30c4d0f341947bc6e07e7dac Mon Sep 17 00:00:00 2001 From: HerrMagic Date: Sun, 6 Oct 2024 19:35:05 +0200 Subject: [PATCH 2/2] update version to css v276 --- ChangeLogs.md | 23 +++++++++++++++++++++++ CustomCommands/CustomCommands.csproj | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ChangeLogs.md diff --git a/ChangeLogs.md b/ChangeLogs.md new file mode 100644 index 0000000..cdcd4c8 --- /dev/null +++ b/ChangeLogs.md @@ -0,0 +1,23 @@ +# Changelogs + + +## v3.0.0 + +### Features +- **Config Option for Command Registration**: Added a new configuration option to disable automatic CSS command registration (e.g., `css_`). This allows you to create custom commands like `!ip` without conflicting with commands like `ip` in vanilla CS2. +- **Client Command Execution**: Introduced support for executing client-side commands. Check out [`ClientCommands.md`](https://github.com/HerrMagiic/CSS-CreateCustomCommands/blob/main/Examples/ClientCommands.md) for more details. +- **Client Command from Server**: Added functionality to send commands from the server to clients. Refer to [`ClientCommands.md`](https://github.com/HerrMagiic/CSS-CreateCustomCommands/blob/main/Examples/ClientCommands.md) for implementation instructions. +- **Server Commands**: New server commands have been added. Example usages can be found in [`ServerCommands.md`](https://github.com/HerrMagiic/CSS-CreateCustomCommands/blob/main/Examples/ServerCommands.md). +- **Updated Example Files**: The example files have been updated with more information and clearer descriptions, making it easier to use the plugin. +- **Server Kick Example**: A server kick example has been added in [`ServerCommands.md`](https://github.com/HerrMagiic/CSS-CreateCustomCommands/blob/main/Examples/ServerCommands.md) to demonstrate kicking players. +- **Random Tag Example**: A new example showcasing random tag functionality has been added. See [`Tags.md`](https://github.com/HerrMagiic/CSS-CreateCustomCommands/blob/main/Examples/Tags.md) for details. +- **Color Tags for Prefixes**: Added the ability to apply color tags to command prefixes for more customization. + +### Bug Fixes +- **Fixed Newline in Language Tag**: Resolved an issue where newlines were not working correctly in language tags. +- **Fixed Unicode characters not working**: Commands and messages now fully support Unicode, enabling broader character compatibility. + +### Optimizations +- **Code Optimizations**: Made small optimizations to improve the code's performance. +- **Variable Refactoring**: Changed most variables to use `var` instead of specific types (like `int` or `string`) for cleaner and more flexible code. +- **Async Command File Reading**: Command files are now read asynchronously, improving performance and responsiveness. diff --git a/CustomCommands/CustomCommands.csproj b/CustomCommands/CustomCommands.csproj index 887cd4f..9c1b9aa 100644 --- a/CustomCommands/CustomCommands.csproj +++ b/CustomCommands/CustomCommands.csproj @@ -10,7 +10,7 @@ - + none runtime compile; build; native; contentfiles; analyzers; buildtransitive