Add support for listening to, blocking, changing, and faking ClientCommandKeyValues.
This commit is contained in:
@@ -138,10 +138,32 @@ forward void OnClientDisconnect_Post(client);
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param args Number of arguments.
|
||||
* @noreturn
|
||||
* @return Plugin_Handled blocks the command from being sent,
|
||||
* and Plugin_Continue resumes normal functionality.
|
||||
*/
|
||||
forward Action:OnClientCommand(client, args);
|
||||
|
||||
/**
|
||||
* Called when a client is sending a KeyValues command.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param kv Editable KeyValues data to be sent as the command.
|
||||
* (This handle cannot be closed.)
|
||||
* @return Plugin_Handled blocks the command from being sent,
|
||||
* and Plugin_Continue resumes normal functionality.
|
||||
*/
|
||||
forward Action OnClientCommandKeyValues(int client, KeyValues kv);
|
||||
|
||||
/**
|
||||
* Called after a client has sent a KeyValues command.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param kv KeyValues data sent as the command.
|
||||
* (This handle cannot be closed.)
|
||||
* @noreturn
|
||||
*/
|
||||
forward void OnClientCommandKeyValues_Post(int client, KeyValues kv);
|
||||
|
||||
/**
|
||||
* Called whenever the client's settings are changed.
|
||||
*
|
||||
|
||||
@@ -190,6 +190,17 @@ native FakeClientCommand(client, const String:fmt[], any:...);
|
||||
*/
|
||||
native FakeClientCommandEx(client, const String: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.
|
||||
* @noreturn
|
||||
* @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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user