Updated includes and spcomp to SourceMod 1.9
This commit is contained in:
Vendored
+114
-103
@@ -58,35 +58,49 @@ enum ReplySource
|
||||
* @section Flags for console commands and console variables. The descriptions
|
||||
* for each constant come directly from the Source SDK.
|
||||
*/
|
||||
#define FCVAR_NONE 0 /**< The default, no flags at all */
|
||||
#define FCVAR_UNREGISTERED (1<<0) /**< If this is set, don't add to linked list, etc. */
|
||||
#define FCVAR_LAUNCHER (1<<1) /**< Defined by launcher. */
|
||||
#define FCVAR_GAMEDLL (1<<2) /**< Defined by the game DLL. */
|
||||
#define FCVAR_CLIENTDLL (1<<3) /**< Defined by the client DLL. */
|
||||
#define FCVAR_MATERIAL_SYSTEM (1<<4) /**< Defined by the material system. */
|
||||
#define FCVAR_PROTECTED (1<<5) /**< It's a server cvar, but we don't send the data since it's a password, etc. Sends 1 if it's not bland/zero, 0 otherwise as value. */
|
||||
#define FCVAR_SPONLY (1<<6) /**< This cvar cannot be changed by clients connected to a multiplayer server. */
|
||||
#define FCVAR_ARCHIVE (1<<7) /**< Set to cause it to be saved to vars.rc */
|
||||
#define FCVAR_NOTIFY (1<<8) /**< Notifies players when changed. */
|
||||
#define FCVAR_USERINFO (1<<9) /**< Changes the client's info string. */
|
||||
#define FCVAR_PRINTABLEONLY (1<<10) /**< This cvar's string cannot contain unprintable characters (e.g., used for player name, etc.) */
|
||||
#define FCVAR_UNLOGGED (1<<11) /**< If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log */
|
||||
#define FCVAR_NEVER_AS_STRING (1<<12) /**< Never try to print that cvar. */
|
||||
#define FCVAR_REPLICATED (1<<13) /**< Server setting enforced on clients. */
|
||||
#define FCVAR_CHEAT (1<<14) /**< Only useable in singleplayer / debug / multiplayer & sv_cheats */
|
||||
#define FCVAR_STUDIORENDER (1<<15) /**< Defined by the studiorender system. */
|
||||
#define FCVAR_DEMO (1<<16) /**< Record this cvar when starting a demo file. */
|
||||
#define FCVAR_DONTRECORD (1<<17) /**< Don't record these command in demo files. */
|
||||
#define FCVAR_PLUGIN (1<<18) /**< Defined by a 3rd party plugin. */
|
||||
#define FCVAR_DATACACHE (1<<19) /**< Defined by the datacache system. */
|
||||
#define FCVAR_TOOLSYSTEM (1<<20) /**< Defined by an IToolSystem library */
|
||||
#define FCVAR_FILESYSTEM (1<<21) /**< Defined by the file system. */
|
||||
#define FCVAR_NOT_CONNECTED (1<<22) /**< Cvar cannot be changed by a client that is connected to a server. */
|
||||
#define FCVAR_SOUNDSYSTEM (1<<23) /**< Defined by the soundsystem library. */
|
||||
#define FCVAR_ARCHIVE_XBOX (1<<24) /**< Cvar written to config.cfg on the Xbox. */
|
||||
#define FCVAR_INPUTSYSTEM (1<<25) /**< Defined by the inputsystem DLL. */
|
||||
#define FCVAR_NETWORKSYSTEM (1<<26) /**< Defined by the network system. */
|
||||
#define FCVAR_VPHYSICS (1<<27) /**< Defined by vphysics. */
|
||||
|
||||
#pragma deprecated No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
|
||||
#define FCVAR_PLUGIN 0 // Actual value is same as FCVAR_SS_ADDED in Left 4 Dead and later.
|
||||
#pragma deprecated Did you mean FCVAR_DEVELOPMENTONLY? (No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.)
|
||||
#define FCVAR_LAUNCHER (1<<1) // Same value as FCVAR_DEVELOPMENTONLY, which is what most usages of this were intending to use.
|
||||
|
||||
|
||||
#define FCVAR_NONE 0 // The default, no flags at all
|
||||
#define FCVAR_UNREGISTERED (1<<0) // If this is set, don't add to linked list, etc.
|
||||
#define FCVAR_DEVELOPMENTONLY (1<<1) // Hidden in released products. Flag is removed automatically if ALLOW_DEVELOPMENT_CVARS is defined. (OB+)
|
||||
#define FCVAR_GAMEDLL (1<<2) // Defined by the game DLL.
|
||||
#define FCVAR_CLIENTDLL (1<<3) // Defined by the client DLL.
|
||||
#define FCVAR_MATERIAL_SYSTEM (1<<4) // Defined by the material system. (EP1-only)
|
||||
#define FCVAR_HIDDEN (1<<4) // Hidden. Doesn't appear in find or autocomplete. Like DEVELOPMENTONLY, but can't be compiled out.1 (OB+)
|
||||
#define FCVAR_PROTECTED (1<<5) // It's a server cvar, but we don't send the data since it's a password, etc.
|
||||
// Sends 1 if it's not bland/zero, 0 otherwise as value.
|
||||
#define FCVAR_SPONLY (1<<6) // This cvar cannot be changed by clients connected to a multiplayer server.
|
||||
#define FCVAR_ARCHIVE (1<<7) // Set to cause it to be saved to vars.rc
|
||||
#define FCVAR_NOTIFY (1<<8) // Notifies players when changed.
|
||||
#define FCVAR_USERINFO (1<<9) // Changes the client's info string.
|
||||
#define FCVAR_PRINTABLEONLY (1<<10) // This cvar's string cannot contain unprintable characters (e.g., used for player name, etc.)
|
||||
#define FCVAR_UNLOGGED (1<<11) // If this is a FCVAR_SERVER, don't log changes to the log file / console if we are creating a log
|
||||
#define FCVAR_NEVER_AS_STRING (1<<12) // Never try to print that cvar.
|
||||
#define FCVAR_REPLICATED (1<<13) // Server setting enforced on clients.
|
||||
#define FCVAR_CHEAT (1<<14) // Only useable in singleplayer / debug / multiplayer & sv_cheats
|
||||
#define FCVAR_SS (1<<15) // causes varnameN where N 2 through max splitscreen slots for mod to be autogenerated (L4D+)
|
||||
#define FCVAR_DEMO (1<<16) // Record this cvar when starting a demo file.
|
||||
#define FCVAR_DONTRECORD (1<<17) // Don't record these command in demo files.
|
||||
#define FCVAR_SS_ADDED (1<<18) // This is one of the "added" FCVAR_SS variables for the splitscreen players (L4D+)
|
||||
#define FCVAR_RELEASE (1<<19) // Cvars tagged with this are the only cvars available to customers (L4D+)
|
||||
#define FCVAR_RELOAD_MATERIALS (1<<20) // If this cvar changes, it forces a material reload (OB+)
|
||||
#define FCVAR_RELOAD_TEXTURES (1<<21) // If this cvar changes, if forces a texture reload (OB+)
|
||||
#define FCVAR_NOT_CONNECTED (1<<22) // Cvar cannot be changed by a client that is connected to a server.
|
||||
#define FCVAR_MATERIAL_SYSTEM_THREAD (1<<23) // Indicates this cvar is read from the material system thread (OB+)
|
||||
#define FCVAR_ARCHIVE_XBOX (1<<24) // Cvar written to config.cfg on the Xbox.
|
||||
#define FCVAR_ARCHIVE_GAMECONSOLE (1<<24) // Cvar written to config.cfg on the Xbox.
|
||||
#define FCVAR_ACCESSIBLE_FROM_THREADS (1<<25) // used as a debugging tool necessary to check material system thread convars (OB+)
|
||||
#define FCVAR_SERVER_CAN_EXECUTE (1<<28) // the server is allowed to execute this command on clients via
|
||||
// ClientCommand/NET_StringCmd/CBaseClientState::ProcessStringCmd. (OB+)
|
||||
#define FCVAR_SERVER_CANNOT_QUERY (1<<29) // If this is set, then the server is not allowed to query this cvar's value (via
|
||||
// IServerPluginHelpers::StartQueryCvarValue).
|
||||
#define FCVAR_CLIENTCMD_CAN_EXECUTE (1<<30) // IVEngineClient::ClientCmd is allowed to execute this command.
|
||||
// Note: IVEngineClient::ClientCmd_Unrestricted can run any client command.
|
||||
|
||||
/**
|
||||
* @endsection
|
||||
@@ -97,9 +111,8 @@ enum ReplySource
|
||||
*
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
*/
|
||||
native ServerCommand(const String:format[], any:...);
|
||||
native void ServerCommand(const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Executes a server command as if it were on the server console (or RCON)
|
||||
@@ -114,25 +127,21 @@ native ServerCommand(const String:format[], any:...);
|
||||
* @param maxlen Length of buffer.
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
*/
|
||||
native ServerCommandEx(String:buffer[], maxlen, const String:format[], any:...);
|
||||
native void ServerCommandEx(char[] buffer, int maxlen, const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Inserts a server command at the beginning of the server command buffer.
|
||||
*
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
*/
|
||||
native InsertServerCommand(const String:format[], any:...);
|
||||
native void InsertServerCommand(const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Executes every command in the server's command buffer, rather than once per frame.
|
||||
*
|
||||
* @noreturn
|
||||
*/
|
||||
native ServerExecute();
|
||||
native void ServerExecute();
|
||||
|
||||
/**
|
||||
* Executes a client command. Note that this will not work on clients unless
|
||||
@@ -141,10 +150,9 @@ native ServerExecute();
|
||||
* @param client Index of the client.
|
||||
* @param fmt Format of the client command.
|
||||
* @param ... Format parameters
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native ClientCommand(client, const String:fmt[], any:...);
|
||||
native void ClientCommand(int client, const char[] fmt, any ...);
|
||||
|
||||
/**
|
||||
* Executes a client command on the server without being networked.
|
||||
@@ -158,10 +166,9 @@ native ClientCommand(client, const String:fmt[], any:...);
|
||||
* @param client Index of the client.
|
||||
* @param fmt Format of the client command.
|
||||
* @param ... Format parameters
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native FakeClientCommand(client, const String:fmt[], any:...);
|
||||
native void FakeClientCommand(int client, const char[] fmt, any ...);
|
||||
|
||||
/**
|
||||
* Executes a client command on the server without being networked. The
|
||||
@@ -171,19 +178,27 @@ native FakeClientCommand(client, const String:fmt[], any:...);
|
||||
* @param client Index of the client.
|
||||
* @param fmt Format of the client command.
|
||||
* @param ... Format parameters
|
||||
* @noreturn
|
||||
* @error Invalid client index, or client not connected.
|
||||
*/
|
||||
native FakeClientCommandEx(client, const String:fmt[], any:...);
|
||||
native void FakeClientCommandEx(int client, const char[] fmt, any ...);
|
||||
|
||||
/**
|
||||
* Executes a KeyValues client command on the server without being networked.
|
||||
*
|
||||
* @param client Index of the client.
|
||||
* @param kv KeyValues data to be sent.
|
||||
* @error Invalid client index, client not connected,
|
||||
* or unsupported on current game.
|
||||
*/
|
||||
native void FakeClientCommandKeyValues(int client, KeyValues kv);
|
||||
|
||||
/**
|
||||
* Sends a message to the server console.
|
||||
*
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
*/
|
||||
native PrintToServer(const String:format[], any:...);
|
||||
native void PrintToServer(const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Sends a message to a client's console.
|
||||
@@ -191,10 +206,9 @@ native PrintToServer(const String:format[], any:...);
|
||||
* @param client Client index.
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error If the client is not connected an error will be thrown.
|
||||
*/
|
||||
native PrintToConsole(client, const String:format[], any:...);
|
||||
native void PrintToConsole(int client, const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Reples to a message in a command.
|
||||
@@ -206,17 +220,16 @@ native PrintToConsole(client, const String:format[], any:...);
|
||||
* @param client Client index, or 0 for server.
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error If the client is not connected or invalid.
|
||||
*/
|
||||
native ReplyToCommand(client, const String:format[], any:...);
|
||||
native void ReplyToCommand(int client, const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Returns the current reply source of a command.
|
||||
*
|
||||
* @return ReplySource value.
|
||||
*/
|
||||
native ReplySource:GetCmdReplySource();
|
||||
native ReplySource GetCmdReplySource();
|
||||
|
||||
/**
|
||||
* Sets the current reply source of a command.
|
||||
@@ -227,7 +240,7 @@ native ReplySource:GetCmdReplySource();
|
||||
* @param source New ReplySource value.
|
||||
* @return Old ReplySource value.
|
||||
*/
|
||||
native ReplySource:SetCmdReplySource(ReplySource:source);
|
||||
native ReplySource SetCmdReplySource(ReplySource source);
|
||||
|
||||
/**
|
||||
* Returns whether the current say hook is a chat trigger.
|
||||
@@ -236,7 +249,7 @@ native ReplySource:SetCmdReplySource(ReplySource:source);
|
||||
*
|
||||
* @return True if a chat trigger, false otherwise.
|
||||
*/
|
||||
native bool:IsChatTrigger();
|
||||
native bool IsChatTrigger();
|
||||
|
||||
/**
|
||||
* Displays usage of an admin command to users depending on the
|
||||
@@ -248,10 +261,9 @@ native bool:IsChatTrigger();
|
||||
* @param tag Tag to prepend to the message.
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error
|
||||
*/
|
||||
native ShowActivity2(client, const String:tag[], const String:format[], any:...);
|
||||
native void ShowActivity2(int client, const char[] tag, const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Displays usage of an admin command to users depending on the
|
||||
@@ -265,10 +277,9 @@ native ShowActivity2(client, const String:tag[], const String:format[], any:...)
|
||||
* @param client Client index doing the action, or 0 for server.
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error
|
||||
*/
|
||||
native ShowActivity(client, const String:format[], any:...);
|
||||
native void ShowActivity(int client, const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Same as ShowActivity(), except the tag parameter is used instead of
|
||||
@@ -278,10 +289,9 @@ native ShowActivity(client, const String:format[], any:...);
|
||||
* @param tag Tag to display with.
|
||||
* @param format Formatting rules.
|
||||
* @param ... Variable number of format parameters.
|
||||
* @noreturn
|
||||
* @error
|
||||
*/
|
||||
native ShowActivityEx(client, const String:tag[], const String:format[], any:...);
|
||||
native void ShowActivityEx(int client, const char[] tag, const char[] format, any ...);
|
||||
|
||||
/**
|
||||
* Given an originating client and a target client, returns the string
|
||||
@@ -299,7 +309,7 @@ native ShowActivityEx(client, const String:tag[], const String:format[], any:...
|
||||
* sm_show_activity filters.
|
||||
* @error Invalid client index or client not connected.
|
||||
*/
|
||||
native FormatActivitySource(client, target, const String:namebuf[], maxlength);
|
||||
native bool FormatActivitySource(int client, int target, const char[] namebuf, int maxlength);
|
||||
|
||||
/**
|
||||
* Called when a server-only command is invoked.
|
||||
@@ -319,10 +329,9 @@ typedef SrvCmd = function Action (int args);
|
||||
* @param callback A function to use as a callback for when the command is invoked.
|
||||
* @param description Optional description to use for command creation.
|
||||
* @param flags Optional flags to use for command creation.
|
||||
* @noreturn
|
||||
* @error Command name is the same as an existing convar.
|
||||
*/
|
||||
native RegServerCmd(const String:cmd[], SrvCmd:callback, const String:description[]="", flags=0);
|
||||
native void RegServerCmd(const char[] cmd, SrvCmd callback, const char[] description="", int flags=0);
|
||||
|
||||
/**
|
||||
* Called when a generic console command is invoked.
|
||||
@@ -345,10 +354,9 @@ typedef ConCmd = function Action (int client, int args);
|
||||
* @param callback A function to use as a callback for when the command is invoked.
|
||||
* @param description Optional description to use for command creation.
|
||||
* @param flags Optional flags to use for command creation.
|
||||
* @noreturn
|
||||
* @error Command name is the same as an existing convar.
|
||||
*/
|
||||
native RegConsoleCmd(const String:cmd[], ConCmd:callback, const String:description[]="", flags=0);
|
||||
native void RegConsoleCmd(const char[] cmd, ConCmd callback, const char[] description="", int flags=0);
|
||||
|
||||
/**
|
||||
* Creates a console command as an administrative command. If the command does not exist,
|
||||
@@ -364,23 +372,29 @@ native RegConsoleCmd(const String:cmd[], ConCmd:callback, const String:descripti
|
||||
* @param group String containing the command group to use. If empty,
|
||||
* the plugin's filename will be used instead.
|
||||
* @param flags Optional console flags.
|
||||
* @noreturn
|
||||
* @error Command name is the same as an existing convar.
|
||||
*/
|
||||
native RegAdminCmd(const String:cmd[],
|
||||
ConCmd:callback,
|
||||
adminflags,
|
||||
const String:description[]="",
|
||||
const String:group[]="",
|
||||
flags=0);
|
||||
|
||||
native void RegAdminCmd(const char[] cmd,
|
||||
ConCmd callback,
|
||||
int adminflags,
|
||||
const char[] description="",
|
||||
const char[] group="",
|
||||
int flags=0);
|
||||
|
||||
/**
|
||||
* Returns whether there is a command callback available.
|
||||
*
|
||||
* @return True if called from inside a command callback.
|
||||
*/
|
||||
native bool IsCommandCallback();
|
||||
|
||||
/**
|
||||
* Returns the number of arguments from the current console or server command.
|
||||
* @note Unlike the HL2 engine call, this does not include the command itself.
|
||||
*
|
||||
* @return Number of arguments to the current command.
|
||||
*/
|
||||
native GetCmdArgs();
|
||||
native int GetCmdArgs();
|
||||
|
||||
/**
|
||||
* Retrieves a command argument given its index, from the current console or
|
||||
@@ -392,7 +406,7 @@ native GetCmdArgs();
|
||||
* @param maxlength Maximum length of the buffer.
|
||||
* @return Length of string written to buffer.
|
||||
*/
|
||||
native GetCmdArg(argnum, String:buffer[], maxlength);
|
||||
native int GetCmdArg(int argnum, char[] buffer, int maxlength);
|
||||
|
||||
/**
|
||||
* Retrieves the entire command argument string in one lump from the current
|
||||
@@ -402,14 +416,14 @@ native GetCmdArg(argnum, String:buffer[], maxlength);
|
||||
* @param maxlength Maximum length of the buffer.
|
||||
* @return Length of string written to buffer.
|
||||
*/
|
||||
native GetCmdArgString(String:buffer[], maxlength);
|
||||
native int GetCmdArgString(char[] buffer, int maxlength);
|
||||
|
||||
/**
|
||||
* Gets a command iterator. Must be freed with CloseHandle().
|
||||
*
|
||||
* @return A new command iterator.
|
||||
*/
|
||||
native Handle:GetCommandIterator();
|
||||
native Handle GetCommandIterator();
|
||||
|
||||
/**
|
||||
* Reads a command iterator, then advances to the next command if any.
|
||||
@@ -423,12 +437,12 @@ native Handle:GetCommandIterator();
|
||||
* @param descLen Command description buffer size.
|
||||
* @return True on success, false if there are no more commands.
|
||||
*/
|
||||
native bool:ReadCommandIterator(Handle:iter,
|
||||
String:name[],
|
||||
nameLen,
|
||||
&eflags=0,
|
||||
String:desc[]="",
|
||||
descLen=0);
|
||||
native bool ReadCommandIterator(Handle iter,
|
||||
char[] name,
|
||||
int nameLen,
|
||||
int &eflags=0,
|
||||
char[] desc="",
|
||||
int descLen=0);
|
||||
|
||||
/**
|
||||
* Returns whether a client has access to a given command string. The string
|
||||
@@ -447,10 +461,10 @@ native bool:ReadCommandIterator(Handle:iter,
|
||||
* there is a matching admin command.
|
||||
* @return True if the client has access, false otherwise.
|
||||
*/
|
||||
native bool:CheckCommandAccess(client,
|
||||
const String:command[],
|
||||
flags,
|
||||
bool:override_only=false);
|
||||
native bool CheckCommandAccess(int client,
|
||||
const char[] command,
|
||||
int flags,
|
||||
bool override_only=false);
|
||||
|
||||
/**
|
||||
* Returns whether an admin has access to a given command string. The string
|
||||
@@ -469,10 +483,10 @@ native bool:CheckCommandAccess(client,
|
||||
* there is a matching admin command.
|
||||
* @return True if the admin has access, false otherwise.
|
||||
*/
|
||||
native bool:CheckAccess(AdminId:id,
|
||||
const String:command[],
|
||||
flags,
|
||||
bool:override_only=false);
|
||||
native bool CheckAccess(AdminId id,
|
||||
const char[] command,
|
||||
int flags,
|
||||
bool override_only=false);
|
||||
|
||||
/**
|
||||
* Returns the bitstring of flags of a command.
|
||||
@@ -481,7 +495,7 @@ native bool:CheckAccess(AdminId:id,
|
||||
* @return A bitstring containing the FCVAR_* flags that are enabled
|
||||
* or INVALID_FCVAR_FLAGS if command not found.
|
||||
*/
|
||||
native GetCommandFlags(const String:name[]);
|
||||
native int GetCommandFlags(const char[] name);
|
||||
|
||||
/**
|
||||
* Sets the bitstring of flags of a command.
|
||||
@@ -490,7 +504,7 @@ native GetCommandFlags(const String:name[]);
|
||||
* @param flags A bitstring containing the FCVAR_* flags to enable.
|
||||
* @return True on success, otherwise false.
|
||||
*/
|
||||
native bool:SetCommandFlags(const String:name[], flags);
|
||||
native bool SetCommandFlags(const char[] name, int flags);
|
||||
|
||||
/**
|
||||
* Starts a ConCommandBase search, traversing the list of ConVars and
|
||||
@@ -512,7 +526,7 @@ native bool:SetCommandFlags(const String:name[], flags);
|
||||
* On failure, INVALID_HANDLE is returned, and the
|
||||
* contents of outputs is undefined.
|
||||
*/
|
||||
native Handle:FindFirstConCommand(String:buffer[], max_size, &bool:isCommand, &flags=0, String:description[]="", descrmax_size=0);
|
||||
native Handle FindFirstConCommand(char[] buffer, int max_size, bool &isCommand, int &flags=0, char[] description="", int descrmax_size=0);
|
||||
|
||||
/**
|
||||
* Reads the next entry in a ConCommandBase iterator.
|
||||
@@ -530,7 +544,7 @@ native Handle:FindFirstConCommand(String:buffer[], max_size, &bool:isCommand, &f
|
||||
* If no more entries exist, false is returned, and the
|
||||
* contents of outputs is undefined.
|
||||
*/
|
||||
native bool:FindNextConCommand(Handle:search, String:buffer[], max_size, &bool:isCommand, &flags=0, String:description[]="", descrmax_size=0);
|
||||
native bool FindNextConCommand(Handle search, char[] buffer, int max_size, bool &isCommand, int &flags=0, char[] description="", int descrmax_size=0);
|
||||
|
||||
/**
|
||||
* Adds an informational string to the server's public "tags".
|
||||
@@ -540,17 +554,15 @@ native bool:FindNextConCommand(Handle:search, String:buffer[], max_size, &bool:i
|
||||
* Note: Currently, this function does nothing because of bugs in the Valve master.
|
||||
*
|
||||
* @param tag Tag string to append.
|
||||
* @noreturn
|
||||
*/
|
||||
native AddServerTag(const String:tag[]);
|
||||
native void AddServerTag(const char[] tag);
|
||||
|
||||
/**
|
||||
* Removes a tag previously added by the calling plugin.
|
||||
*
|
||||
* @param tag Tag string to remove.
|
||||
* @noreturn
|
||||
*/
|
||||
native RemoveServerTag(const String:tag[]);
|
||||
native void RemoveServerTag(const char[] tag);
|
||||
|
||||
/**
|
||||
* Callback for command listeners. This is invoked whenever any command
|
||||
@@ -597,7 +609,7 @@ typedef CommandListener = function Action (int client, const char[] command, int
|
||||
* @return True if this feature is available on the current game,
|
||||
* false otherwise.
|
||||
*/
|
||||
native bool:AddCommandListener(CommandListener:callback, const String:command[]="");
|
||||
native bool AddCommandListener(CommandListener callback, const char[] command="");
|
||||
|
||||
/**
|
||||
* Removes a previously added command listener, in reverse order of being added.
|
||||
@@ -607,7 +619,7 @@ native bool:AddCommandListener(CommandListener:callback, const String:command[]=
|
||||
* The command is case insensitive.
|
||||
* @error Callback has no active listeners.
|
||||
*/
|
||||
native RemoveCommandListener(CommandListener:callback, const String:command[]="");
|
||||
native void RemoveCommandListener(CommandListener callback, const char[] command="");
|
||||
|
||||
/**
|
||||
* Returns true if the supplied command exists.
|
||||
@@ -615,7 +627,7 @@ native RemoveCommandListener(CommandListener:callback, const String:command[]=""
|
||||
* @param command Command to find.
|
||||
* @return True if command is found, false otherwise.
|
||||
*/
|
||||
stock bool:CommandExists(const String:command[])
|
||||
stock bool CommandExists(const char[] command)
|
||||
{
|
||||
return (GetCommandFlags(command) != INVALID_FCVAR_FLAGS);
|
||||
}
|
||||
@@ -629,7 +641,7 @@ stock bool:CommandExists(const String:command[])
|
||||
* @return An Action value. Returning Plugin_Handled bypasses the game function call.
|
||||
Returning Plugin_Stop bypasses the post hook as well as the game function.
|
||||
*/
|
||||
forward Action:OnClientSayCommand(client, const String:command[], const String:sArgs[]);
|
||||
forward Action OnClientSayCommand(int client, const char[] command, const char[] sArgs);
|
||||
|
||||
/**
|
||||
* Global post listener for the chat commands.
|
||||
@@ -637,6 +649,5 @@ forward Action:OnClientSayCommand(client, const String:command[], const String:s
|
||||
* @param client Client index.
|
||||
* @param command Command name.
|
||||
* @param sArgs Chat argument string.
|
||||
*
|
||||
*/
|
||||
forward void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs);
|
||||
|
||||
Reference in New Issue
Block a user