Contains functions for hooking user messages.
More...
#include <public/IUserMessages.h>
|
virtual unsigned int | GetInterfaceVersion () |
| Must return an integer defining the interface's version.
|
|
virtual const char * | GetInterfaceName () |
| Must return a string defining the interface's unique name.
|
|
virtual int | GetMessageIndex (const char *msg)=0 |
| Finds a message id by name. More...
|
|
virtual bool | HookUserMessage (int msg_id, IUserMessageListener *pListener, bool intercept=false)=0 |
| Sets a hook on a user message. More...
|
|
virtual bool | UnhookUserMessage (int msg_id, IUserMessageListener *pListener, bool intercept=false)=0 |
| Unhooks a user message. More...
|
|
virtual bf_write * | StartBitBufMessage (int msg_id, const cell_t players[], unsigned int playersNum, int flags)=0 |
| Wrapper around UserMessageBegin for more options. More...
|
|
virtual google::protobuf::Message * | StartProtobufMessage (int msg_id, const cell_t players[], unsigned int playersNum, int flags)=0 |
|
virtual bool | EndMessage ()=0 |
| Wrapper around UserMessageEnd for use with StartMessage(). More...
|
|
virtual bool | HookUserMessage2 (int msg_id, IUserMessageListener *pListener, bool intercept=false)=0 |
| Sets a hook on a user message using the newer API (OnPostUserMessage). More...
|
|
virtual bool | UnhookUserMessage2 (int msg_id, IUserMessageListener *pListener, bool intercept=false)=0 |
| Unhooks a user message using the newer API (OnPostUserMessage). More...
|
|
virtual bool | GetMessageName (int msgid, char *buffer, size_t maxlength) const =0 |
| Finds a message name by id. More...
|
|
virtual UserMessageType | GetUserMessageType () const =0 |
| Returns usermessage serialization type used for the current engine. More...
|
|
virtual bool | IsVersionCompatible (unsigned int version) |
| Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning. More...
|
|
Contains functions for hooking user messages.
virtual bool SourceMod::IUserMessages::EndMessage |
( |
| ) |
|
|
pure virtual |
Wrapper around UserMessageEnd for use with StartMessage().
- Returns
- True on success, false otherwise.
virtual int SourceMod::IUserMessages::GetMessageIndex |
( |
const char * |
msg | ) |
|
|
pure virtual |
Finds a message id by name.
- Parameters
-
msg | Case-sensitive string containing the message. |
- Returns
- A message index, or -1 on failure.
virtual bool SourceMod::IUserMessages::GetMessageName |
( |
int |
msgid, |
|
|
char * |
buffer, |
|
|
size_t |
maxlength |
|
) |
| const |
|
pure virtual |
Finds a message name by id.
- Parameters
-
msgid | The message index. |
buffer | Buffer string to hold the message name in. |
maxlength | Size of the buffer. |
- Returns
- A message index, or -1 on failure.
virtual UserMessageType SourceMod::IUserMessages::GetUserMessageType |
( |
| ) |
const |
|
pure virtual |
Returns usermessage serialization type used for the current engine.
- Returns
- The supported usermessage type.
virtual bool SourceMod::IUserMessages::HookUserMessage |
( |
int |
msg_id, |
|
|
IUserMessageListener * |
pListener, |
|
|
bool |
intercept = false |
|
) |
| |
|
pure virtual |
Sets a hook on a user message.
- Parameters
-
msg_id | Message Id. |
pListener | Pointer to an IUserMessageListener. |
intercept | If true, message will be intercepted rather than merely hooked. |
- Returns
- True on success, false otherwise.
virtual bool SourceMod::IUserMessages::HookUserMessage2 |
( |
int |
msg_id, |
|
|
IUserMessageListener * |
pListener, |
|
|
bool |
intercept = false |
|
) |
| |
|
pure virtual |
Sets a hook on a user message using the newer API (OnPostUserMessage).
- Parameters
-
msg_id | Message Id. |
pListener | Pointer to an IUserMessageListener. |
intercept | If true, message will be intercepted rather than merely hooked. |
- Returns
- True on success, false otherwise.
virtual bf_write* SourceMod::IUserMessages::StartBitBufMessage |
( |
int |
msg_id, |
|
|
const cell_t |
players[], |
|
|
unsigned int |
playersNum, |
|
|
int |
flags |
|
) |
| |
|
pure virtual |
Wrapper around UserMessageBegin for more options.
- Parameters
-
msg_id | Message Id. |
players | Array containing player indexes. |
playersNum | Number of players in the array. |
flags | Flags to use for sending the message. |
- Returns
- bf_write structure to write message with, or NULL on failure.
virtual bool SourceMod::IUserMessages::UnhookUserMessage |
( |
int |
msg_id, |
|
|
IUserMessageListener * |
pListener, |
|
|
bool |
intercept = false |
|
) |
| |
|
pure virtual |
Unhooks a user message.
- Parameters
-
msg_id | Message Id. |
pListener | Pointer to an IUserMessageListener. |
intercept | If true, message is removed from interception pool rather than the normal hook pool. |
- Returns
- True on success, false otherwise.
virtual bool SourceMod::IUserMessages::UnhookUserMessage2 |
( |
int |
msg_id, |
|
|
IUserMessageListener * |
pListener, |
|
|
bool |
intercept = false |
|
) |
| |
|
pure virtual |
Unhooks a user message using the newer API (OnPostUserMessage).
- Parameters
-
msg_id | Message Id. |
pListener | Pointer to an IUserMessageListener. |
intercept | If true, message is removed from interception pool rather than the normal hook pool. |
- Returns
- True on success, false otherwise.
The documentation for this class was generated from the following file: