User Guide ‐ Main interface ‐ Others ‐ RCON Chat Commands - MarechJ/hll_rcon_tool GitHub Wiki

🧭 You are here : Wiki home / User Guide / Main interface / Others / RCON Chat Commands


image

You can run any arbitrary "auto_settings_capable" RCON command on chat messages.
These commands can use parameters (either user-provided ones, or ones provided by the context, such as the player's ID (Steam/GamePass).

See the API documentation (/api/get_api_documentation) for "auto_settings_capable" commands and their available parameters.

Enabled

Enables the whole set of RCON Chat Commands.
Either trueor false`

  "enabled": true,

Command Words

Each command entry has 5 main parameters :

  • the words that will trigger the command
  • the command's description
  • the API commands and their arguments
  • the enabled status
  • the conditions that have to be met for the command to work

"words"

The word(s) the player has to enter in the chat to trigger the command.
They must start either with a ! or a @ sign.

      "words": [
        "!switch",
        "@switch"
      ],

"description"

A short description of what the command does.
It will be displayed in a message when the describe_words commands are entered.

    "description": "Switch yourself in side",

"commands"

Can hold a list of commands that should be executed (in an undefined order).

The syntax is the same as in "auto_settings_capable" commands.

Parameter values can have context parameters replace.
Context parameters are things like player_name or player_id of the player issuing the command.

Example : switch_player_now API command and its player_name parameter

        "commands": {

          "switch_player_now": {
            "player_name": "{player_name}"

          },

Example : punish API command and its player_name, reason and by parameters

      "commands": {

        "punish": {
          "player_name": "{player_name}",
          "reason": "Fast redeploy",
          "by": "CRCON chat command"
        }

      },

"enabled"

Enables this RCON Chat Command.
Either trueor false

      "enabled": true,

"conditions"

The command(s) won't be executed if these aren't met.
You can have multiple conditions (each one must be met for the command to be executed).
Available conditions : player_count, online_mods, ingame_mods, current_map, time_of_day, player_flags, player_id.

      "conditions": {

        "player_flag": {
          "flags": [
            "👍"
          ]
        },

        "player_count": {
          "max": 49,
          "min": 0
        },

        "player_id": {
          "player_ids": [
            "765611...",
            "765612..."
          ]
        }

      },

Describe Words

Entering one of these in chat will send a message describing all the available and enabled RCON Chat commands.

  "describe_words": [
    "!commands"
  ]

Full example (3 RCON Chat Commands)

{
  "command_words": [
    {
      "words": [
        "!switch"
      ],
      "description": "Switch yourself in side",
      "commands": {
        "switch_player_now": {
          "player_name": "{player_name}"
        }
      },
      "enabled": false,
      "conditions": {
        "player_flag": {
          "flags": [
            "👍"
          ]
        },
        "player_count": {
          "max": 49,
          "min": 0
        }
      }
    },
    {
      "words": [
        "!cam"
      ],
      "description": "Add yourself to admin cam list",
      "commands": {
        "add_admin": {
          "role": "junior",
          "player_id": "{player_id}",
          "player_name": "{player_name}"
        }
      },
      "enabled": false,
      "conditions": {
        "player_id": {
          "player_ids": [
            "765611...",
            "765612..."
          ]
        }
      }
    },
    {
      "words": [
        "!r"
      ],
      "description": "Receive an admin punish so you can redeploy in 10s.",
      "commands": {
        "punish": {
          "by": "CRCON chat command",
          "reason": "Fast redeploy",
          "player_name": "{player_name}"
        }
      },
      "enabled": true,
      "conditions": {
        "player_count": {
          "max": 100,
          "min": 0
        }
      }
    }
  ],
  "enabled": true,
  "describe_words": [
    "!commands"
  ]
}