Releases: lengran/CS2AnnouncementBroadcaster
v0.5 The admin flag
- Added an optional flag admin to all types of messages. Messages with this flag set to True will only be displayed to admins. The default value of this flag is False.
Example
"OnPlayerConnectMsgs": [
{
"msg": "[GREEN][Test message][NORMAL] admin message 1.",
"delay": 5,
"admin": true
}
],
"OnCommandMsgs": [
{
"msg": "[GREEN][Test message][NORMAL] admin message 2.",
"admin": true,
"cmd": "testadmin"
}
],
Note: Please replace all OnAdminConnectMsgs with OnPlayerConnectMsgs with a positive admin flag since OnAdminConnectMsgs may not be supported in future versions.
v0.4 OnAdminConnectMsgs (deprecated)
- Added a new type of messages: OnAdminConnectMsgs. It works in the same way how OnPlayerConnectMsgs works except that only admins can see it.
Update 20240817:
- This type of message is deprecated. Use the admin flag instead.
v0.3.1 delayed OnPlayerConnect messages
Support adding a delay to a OnPlayerConnect message. This is an optional filed that you can specify in the configuration file. Hope this will save you from the flood of welcome messages.
Thanks for this great idea. @mavproductions.
An example:
{
"msg": "The message to sent.",
"delay": 3.1415926
}
v0.3.0 Conditional messages
In this build, conditional messages are supported. Each message can contain an optional cond section.
The cond section is optional. It allows admins to set a pre-defined condition that can enable or disable a message from being broadcasted on-the-fly. There are 5 available flags, namely CS2AB_flag_1, CS2AB_flag_2, CS2AB_flag_3, CS2AB_flag_4, CS2AB_flag_5. Each of them can be set in the same way of setting an integer convar. The following operations are supported in the definition of a cond. Default values of these flags are 0.
- Operations:
- 0: disabled (the condition is always true)
- 1: equal to
- 2: smaller than
- 3: greater than
The overall structure of a configuration file will look like this.
{
"msg": "The body of a message.",
"properties": "Value",
"cond": {
"flag": "CS2AB_flag_1",
"op": 1,
"value": 10
}
}
v0.2.1 performance optimization
Some optimization that should be able to improve performance.
v0.2.0 TimerMsg
In this release, timer triggered messages are supported. You can specify a time interval to a message, and the plugin will broadcast it to all the players every time a set time passes.
{
"msg": "A timer triggered message.",
"timer": 60.0
}
v0.1.0 OnCommandMsg
Support a new type of message, OnCommandMsg. It allows admins to define custom commands, e.g. "!help", and use them to return messages.
There are 2 fields that must be given to use OnCommandMsg:
- msg is the returned message.
- cmd is the command to trigger the message.
v0.0.2 OnRoundStartMsgs
Now we have 2 types of messages available.
- OnPlayerConnectMsgs
- OnRoundStartMsgs
Also, reloading configuration on the fly is now supported. Admins could use the command "css_abreload" or type "!abreload" to mannually reload configuration.
v0.0.1 OnPlayerConnectMsg
The first release. Provide OnPlayerConnectMsg sent to a player when he/she connects to the server.