To remedy FS#1059, I created this plugin. It does the same exact thing as commandlist.txt does for Mani Admin Plugin. EDIT: This plugin now offers more advanced features than Mani's commandlist.txt, such as variables and multiple flags.

You create a commandlist.txt (or commandlist.cfg) file in your sourcemod/configs directory and enter the commands.

I have written down all the instructions in the default commandlist.txt, which you can find in the archive files, or look at the copy and paste here:

Code:

// Triggers configuration file
// by theY4Kman
//
// So, here's the rundown!
// Commands are entered using the format "<command> <flags> <replacement>"
//
// For example:
// die C kill
//
// When the player types "die" into chat, it will run "kill" on them,
// forcing them to suicide.
//
// Here are the core flags (One needs at least one of these flags to do anything):
// R - Rcon command
// To run this, the user must have Rcon or Root access
// C - Client command
// Run on the player
// Note: only commands with FCVAR_SERVER_CAN_EXECUTE will run
// F - Fake client command
// Runs a networked command as if a player had done it
// S - Fake client say command
// Convenience flag that runs a fake client command with "say" in front of it
// So "hi S Hi!" is the same as "hi F say Hi!"
//
// These next flags are optional:
// v - No variables (Disables the parsing of variables)
// "hi S Hi, I'm %n!" will actually display "Hi, I'm %n!"
// d - Do not display the player's message
// f - Begins a block denoting the flags necessary to run the trigger.
// After the letter, a block beginning with '{' and ending with '}' will contain
// admin flags required for this trigger. For example:
// "kick Rf{c} sm_kick"
// This will let any admin with the kick admin flag execute this trigger.
// If this flag is left out, Triggers will use the admin flags in the cvar "triggers_rcon"
// If one wishes to simply have a command without permissions, use a lone 'f' character.
// e.g., "killme Rf sm_slay %n" is the same as "killme Rf{} sm_slay %n"
//
// Yes, there are variables in this, if only a few.
// The variables are in C-type format, meaning they are a percent sign followed by a single character:
// %i - The IP of the server
// %s - The Steam ID of the player whom triggered the command
// %n - The name of the player whom triggered the command
// %u - The user ID of the player whom triggered the command
// %h - The hostname of the server
// %c - Begins a custom ConVar block.
// This allows one to access ConVars besides "ip" and "hostname"
// To utilize it, use the same syntax as for the `f` flag:
// %c{convar_name}
// To display a literal '%', prepend it with a backslash ('\')
//
// The only comment type available is the single line comment.
// To use it, place "//" IN FRONT OF THE LINE. It will not work anywhere else
//
// Note: For chat messages, the longest a message can be is 127 characters long.
// This includes players' names, hostname, etc!

Notes:

'message' can currently only be one word -- I don't see this changing in the future. It's unnecessary most of the time, and would require work. Work. THIS IS AN OUTRAGE!

Commands/Cvars:

triggers_version: The version of Triggers

triggers_reload: Clears the commandlist in memory and loads a new one. You can specify a filename to use for loading by calling it by "triggers_reload file"

triggers_rcon: The SourceMod Admin flags that allow someone to run an Rcon command. The person must have at least one of the flags (Flag reference here). (v2.2.0: This convar can be overridden on a per-trigger basis)

Changelog:

1.0.0
* Initial upload
* Basic functionality: Run a command when something is said

The plugin parses the config by finding the first space, then selecting all the text behind it for the message. Next, it takes the letter after that first space for the type. Finally, it takes all of the text after the space behind the type character for the command. So...