SourceMod SDK  1.7
SourceMod::IPlayerManager Class Referenceabstract
Inheritance diagram for SourceMod::IPlayerManager:
SourceMod::SMInterface

Public Member Functions

const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
 
unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
 
virtual void AddClientListener (IClientListener *listener)=0
 Adds a client listener. More...
 
virtual void RemoveClientListener (IClientListener *listener)=0
 Removes a client listener. More...
 
virtual IGamePlayerGetGamePlayer (int client)=0
 Retrieves an IGamePlayer object by its client index. More...
 
virtual IGamePlayerGetGamePlayer (edict_t *pEdict)=0
 Retrieves an IGamePlayer object by its edict_t pointer. More...
 
virtual int GetMaxClients ()=0
 Returns the maximum number of clients. More...
 
virtual int GetNumPlayers ()=0
 Returns the number of players currently connected. More...
 
virtual int GetClientOfUserId (int userid)=0
 Returns the client index by its userid. More...
 
virtual bool IsServerActivated ()=0
 Returns whether or not the server is activated. More...
 
virtual unsigned int GetReplyTo ()=0
 Gets SourceMod's reply source. More...
 
virtual unsigned int SetReplyTo (unsigned int reply)=0
 Sets SourceMod's reply source. More...
 
virtual int FilterCommandTarget (IGamePlayer *pAdmin, IGamePlayer *pTarget, int flags)=0
 Tests if a player meets command filtering rules. More...
 
virtual void RegisterCommandTargetProcessor (ICommandTargetProcessor *pHandler)=0
 Registers a command target processor. More...
 
virtual void UnregisterCommandTargetProcessor (ICommandTargetProcessor *pHandler)=0
 Removes a command target processor. More...
 
virtual int GetClientFromSerial (unsigned int serial)=0
 Returns the client index by its serial number. More...
 
virtual void ProcessCommandTarget (cmd_target_info_t *info)=0
 Processes the pattern inside a cmd_target_info_t structure and outputs the clients that match it. More...
 
virtual void ClearAdminId (AdminId id)=0
 Removes all access for the given admin id. More...
 
virtual void RecheckAnyAdmins ()=0
 Reruns admin checks on all players.
 
- Public Member Functions inherited from SourceMod::SMInterface
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...
 

Member Function Documentation

virtual void SourceMod::IPlayerManager::AddClientListener ( IClientListener listener)
pure virtual

Adds a client listener.

Parameters
listenerPointer to an IClientListener.
virtual void SourceMod::IPlayerManager::ClearAdminId ( AdminId  id)
pure virtual

Removes all access for the given admin id.

Parameters
idAdmin id.
virtual int SourceMod::IPlayerManager::FilterCommandTarget ( IGamePlayer pAdmin,
IGamePlayer pTarget,
int  flags 
)
pure virtual

Tests if a player meets command filtering rules.

Parameters
pAdminIGamePlayer of the admin, or NULL if the server.
pTargetIGamePlayer of the player being targeted.
flagsCOMMAND_FILTER flags.
Returns
COMMAND_TARGET value.
virtual int SourceMod::IPlayerManager::GetClientFromSerial ( unsigned int  serial)
pure virtual

Returns the client index by its serial number.

Returns
Client index, or 0 for invalid serial.
virtual int SourceMod::IPlayerManager::GetClientOfUserId ( int  userid)
pure virtual

Returns the client index by its userid.

Parameters
useridUserid of the client.
Returns
Client index, or 0 if invalid userid passed.
virtual IGamePlayer* SourceMod::IPlayerManager::GetGamePlayer ( int  client)
pure virtual

Retrieves an IGamePlayer object by its client index.

Note: This will return a valid object for any player, connected or not. Note: Client indexes start at 1, not 0.

Parameters
clientIndex of the client.
Returns
An IGamePlayer pointer, or NULL if out of range.
virtual IGamePlayer* SourceMod::IPlayerManager::GetGamePlayer ( edict_t *  pEdict)
pure virtual

Retrieves an IGamePlayer object by its edict_t pointer.

Parameters
pEdictIndex of the client
Returns
An IGamePlayer pointer, or NULL if out of range.
virtual int SourceMod::IPlayerManager::GetMaxClients ( )
pure virtual

Returns the maximum number of clients.

Note: this will not work until the server is activated.

Returns
Maximum number of clients.
virtual int SourceMod::IPlayerManager::GetNumPlayers ( )
pure virtual

Returns the number of players currently connected.

Returns
Current number of connected clients.
virtual unsigned int SourceMod::IPlayerManager::GetReplyTo ( )
pure virtual

Gets SourceMod's reply source.

Returns
ReplyTo source.
virtual bool SourceMod::IPlayerManager::IsServerActivated ( )
pure virtual

Returns whether or not the server is activated.

Returns
True if ServerActivate() has been called at least once, false otherwise.
virtual void SourceMod::IPlayerManager::ProcessCommandTarget ( cmd_target_info_t info)
pure virtual

Processes the pattern inside a cmd_target_info_t structure and outputs the clients that match it.

Parameters
infoPointer to the cmd_target_info_t structure to process.
virtual void SourceMod::IPlayerManager::RegisterCommandTargetProcessor ( ICommandTargetProcessor pHandler)
pure virtual

Registers a command target processor.

Parameters
pHandlerPointer to an ICommandTargetProcessor instance.
virtual void SourceMod::IPlayerManager::RemoveClientListener ( IClientListener listener)
pure virtual

Removes a client listener.

Parameters
listenerPointer to an IClientListener.
virtual unsigned int SourceMod::IPlayerManager::SetReplyTo ( unsigned int  reply)
pure virtual

Sets SourceMod's reply source.

Parameters
replyReply source.
Returns
Old reply source.
virtual void SourceMod::IPlayerManager::UnregisterCommandTargetProcessor ( ICommandTargetProcessor pHandler)
pure virtual

Removes a command target processor.

Parameters
pHandlerPointer to an ICommandTargetProcessor instance.

The documentation for this class was generated from the following file: