SourceMod::IUserMessages Class Reference

Contains functions for hooking user messages. More...

#include <public/IUserMessages.h>

Inherits SourceMod::SMInterface.

Inheritance diagram for SourceMod::IUserMessages:

[legend]
Collaboration diagram for SourceMod::IUserMessages:
[legend]
List of all members.

Public Member Functions

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.
virtual bool HookUserMessage (int msg_id, IUserMessageListener *pListener, bool intercept=false)=0
 Sets a hook on a user message.
virtual bool UnhookUserMessage (int msg_id, IUserMessageListener *pListener, bool intercept=false)=0
 Unhooks a user message.
virtual bf_write * StartMessage (int msg_id, const cell_t players[], unsigned int playersNum, int flags)=0
 Wrapper around UserMessageBegin for more options.
virtual bool EndMessage ()=0
 Wrapper around UserMessageEnd for use with StartMessage().

Detailed Description

Contains functions for hooking user messages.

Definition at line 98 of file IUserMessages.h.


Member Function Documentation

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::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::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, removed message will from interception pool rather than normal hook pool.
Returns:
True on success, false otherwise.

virtual bf_write* SourceMod::IUserMessages::StartMessage ( 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::EndMessage (  )  [pure virtual]

Wrapper around UserMessageEnd for use with StartMessage().

Returns:
True on success, false otherwise.


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 07:10:04 2008 for SourceMod SDK by  doxygen 1.5.1