Core api
IToolkitCommands
IToolkitCommands
Methods
RegisterChatListener(owner, pchName, handler)
Registers a chat command listener.
Parameters
- owner PluginId — Plugin ID that owns the command
- pchName const char* — Command name (e.g. "!kick", "!test")
- handler ChatHandler — Callback executed when command is triggered
UnregisterChatListener(owner, pchName)
Drops one of this plugin's chat listeners.
Parameters
- owner PluginId
- pchName const char*
RegisterConCommand(owner, pchName, handler)
Registers a console command.
Parameters
- owner PluginId — Plugin ID that owns the command
- pchName const char* — Command name (e.g. "sv_test")
- handler ChatHandler — Callback executed when command is used
UnregisterConCommand(owner, pchName)
Removes a console command this plugin created.
Parameters
- owner PluginId
- pchName const char*
RegisterConListener(owner, pchName, handler, post)
Registers a listener for an existing console command.
Parameters
- owner PluginId — Plugin ID that owns the listener
- pchName const char* — Existing command name to listen for
- handler CommandHandler — Callback executed on command execution
- post bool — false to run before the original, true to run after
UnregisterConListener(owner, pchName, post)
Drops one of this plugin's console listeners.
Parameters
- owner PluginId
- pchName const char*
- post bool