Added ServerCommandEx native to get the response when running a command (bug 3873, r=ds).
This commit is contained in:
@@ -121,6 +121,23 @@ enum ConVarQueryResult
|
||||
*/
|
||||
native ServerCommand(const String:format[], any:...);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @param buffer String to store command result into.
|
||||
* @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:...);
|
||||
|
||||
/**
|
||||
* Inserts a server command at the beginning of the server command buffer.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user