| AddCommandListener | Adds a callback that will fire when a command is sent to the server.
Registering commands is designed to create a new command as part of the UI,
whereas this is a lightweight hook on a command string, existing or not.
Using Reg*Cmd to intercept is in poor practice, as it physically creates a
new command and can slow down dispatch in general.
To see if this feature is available, use FeatureType_Capability and
FEATURECAP_COMMANDLISTENER. |
| AddServerTag | Adds an informational string to the server's public "tags".
This string should be a short, unique identifier.
Note: Tags are automatically removed when a plugin unloads.
Note: Currently, this function does nothing because of bugs in the Valve master. |
| CheckAccess | Returns whether an admin has access to a given command string. The string
can be any override string, as overrides can be independent of
commands. This feature essentially allows you to create custom flags
using the override system. |
| CheckCommandAccess | Returns whether a client has access to a given command string. The string
can be any override string, as overrides can be independent of
commands. This feature essentially allows you to create custom
flags using the override system. |
| ClientCommand | Executes a client command. Note that this will not work on clients unless
they have cl_restrict_server_commands set to 0. |
| CommandExists | Returns true if the supplied command exists. |
| FakeClientCommand | Executes a client command on the server without being networked.
FakeClientCommand() overwrites the command tokenization buffer. This can
cause undesired effects because future calls to GetCmdArg* will return
data from the FakeClientCommand(), not the parent command. If you are in
a hook where this matters (for example, a "say" hook), you should use
FakeClientCommandEx() instead. |
| FakeClientCommandEx | Executes a client command on the server without being networked. The
execution of the client command is delayed by one frame to prevent any
re-entrancy issues that might surface with FakeClientCommand(). |
| FakeClientCommandKeyValues | Executes a KeyValues client command on the server without being networked. |
| FindFirstConCommand | Starts a ConCommandBase search, traversing the list of ConVars and
ConCommands. If a Handle is returned, the next entry must be read
via FindNextConCommand(). The order of the list is undefined. |
| FindNextConCommand | Reads the next entry in a ConCommandBase iterator. |
| FormatActivitySource | Given an originating client and a target client, returns the string
that describes the originating client according to the sm_show_activity cvar.
For example, "ADMIN", "PLAYER", or a player's name could be placed in this buffer. |
| GetCmdArg | Retrieves a command argument given its index, from the current console or
server command. |
| GetCmdArgFloat | Retrieves a float command argument given its index, from the current
console or server command. Will return 0.0 if the argument can not be
parsed as a number. Use GetCmdArgFloatEx to handle that explicitly. |
| GetCmdArgFloatEx | Retrieves a float command argument given its index, from the current
console or server command. Returns false if the argument can not be
completely parsed as a floating point. |
| GetCmdArgInt | Retrieves a numeric command argument given its index, from the current
console or server command. Will return 0 if the argument can not be
parsed as a number. Use GetCmdArgIntEx to handle that explicitly. |
| GetCmdArgIntEx | Retrieves a numeric command argument given its index, from the current
console or server command. Returns false if the argument can not be
completely parsed as an integer. |
| GetCmdArgs | Returns the number of arguments from the current console or server command. |
| GetCmdArgString | Retrieves the entire command argument string in one lump from the current
console or server command. |
| GetCmdReplySource | Returns the current reply source of a command. |
| GetCommandFlags | Returns the bitstring of flags of a command. |
| GetCommandIterator | Gets a command iterator. Must be freed with CloseHandle(). |
| GetPublicChatTriggers | Get the list of characters used for public chat triggers. |
| GetSilentChatTriggers | Get the list of characters used for silent chat triggers. |
| InsertServerCommand | Inserts a server command at the beginning of the server command buffer. |
| IsChatTrigger | Returns whether the current say hook is a chat trigger.
This function is only meaningful inside say or say_team hooks. |
| PrintToConsole | Sends a message to a client's console. |
| PrintToConsoleAll | Sends a message to every client's console. |
| PrintToServer | Sends a message to the server console. |
| ReadCommandIterator | Reads a command iterator, then advances to the next command if any.
Only SourceMod specific commands are returned. |
| RegAdminCmd | Creates a console command as an administrative command. If the command does not exist,
it is created. When this command is invoked, the access rights of the player are
automatically checked before allowing it to continue.
Admin commands are case sensitive from both the client and server. |
| RegConsoleCmd | Creates a console command, or hooks an already existing one.
Console commands are case sensitive. However, if the command already exists in the game,
a client may enter the command in any case. SourceMod corrects for this automatically,
and you should only hook the "real" version of the command. |
| RegServerCmd | Creates a server-only console command, or hooks an already existing one.
Server commands are case sensitive. |
| RemoveCommandListener | Removes a previously added command listener, in reverse order of being added. |
| RemoveServerTag | Removes a tag previously added by the calling plugin. |
| ReplyToCommand | Replies to a message in a command.
A client index of 0 will use PrintToServer().
If the command was from the console, PrintToConsole() is used.
If the command was from chat, PrintToChat() is used. |
| ServerCommand | Executes a server command as if it were on the server console (or RCON) |
| ServerCommandEx | Executes a server command as if it were on the server console (or RCON)
and stores the printed text into buffer.
Warning: This calls ServerExecute internally and may have issues if
certain commands are in the buffer, only use when you really need
the response.
Also, on L4D2 this will not print the command output to the server console. |
| ServerExecute | Executes every command in the server's command buffer, rather than once per frame. |
| SetCmdReplySource | Sets the current reply source of a command.
Only use this if you know what you are doing. You should save the old value
and restore it once you are done. |
| SetCommandFlags | Sets the bitstring of flags of a command. |
| ShowActivity | Displays usage of an admin command to users depending on the
setting of the sm_show_activity cvar.
This version does not display a message to the originating client
if used from chat triggers or menus. If manual replies are used
for these cases, then this function will suffice. Otherwise,
ShowActivity2() is slightly more useful. |
| ShowActivity2 | Displays usage of an admin command to users depending on the
setting of the sm_show_activity cvar. All users receive a message
in their chat text, except for the originating client, who receives
the message based on the current ReplySource. |
| ShowActivityEx | Same as ShowActivity(), except the tag parameter is used instead of
"[SM] " (note that you must supply any spacing). |