SourceMod::IGameHelpers Class Reference

Inherits SourceMod::SMInterface.

Inheritance diagram for SourceMod::IGameHelpers:

Inheritance graph
[legend]
Collaboration diagram for SourceMod::IGameHelpers:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
virtual unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
virtual SendProp * FindInSendTable (const char *classname, const char *offset)=0
 Deprecated; use FindSendPropInfo() instead.
virtual ServerClass * FindServerClass (const char *classname)=0
 Finds a named server class.
virtual typedescription_t * FindInDataMap (datamap_t *pMap, const char *offset)=0
 Finds a datamap_t definition.
virtual datamap_t * GetDataMap (CBaseEntity *pEntity)=0
 Retrieves an entity's datamap_t pointer.
virtual void SetEdictStateChanged (edict_t *pEdict, unsigned short offset)=0
 Marks an edict as state changed for an offset.
virtual bool TextMsg (int client, int dest, const char *msg)=0
 Sends a text message to a client.
virtual bool IsLANServer ()=0
 Returns whether the server ls a LAN server.
virtual bool FindSendPropInfo (const char *classname, const char *offset, sm_sendprop_info_t *info)=0
 Finds a send property in a named ServerClass.
virtual edict_t * EdictOfIndex (int index)=0
 Converts an entity index into an edict pointer.
virtual int IndexOfEdict (edict_t *pEnt)=0
 Converts an edict pointer into an entity index.
virtual edict_t * GetHandleEntity (CBaseHandle &hndl)=0
 Retrieves the edict pointer from a CBaseHandle object.
virtual void SetHandleEntity (CBaseHandle &hndl, edict_t *pEnt)=0
 Sets the edict pointer in a CBaseHandle object.
virtual const char * GetCurrentMap ()=0
 Returns the current map name.
virtual void ServerCommand (const char *buffer)=0
 Wraps IVEngineServer::ServerCommand.

Detailed Description

Definition at line 64 of file IGameHelpers.h.


Member Function Documentation

virtual SendProp* SourceMod::IGameHelpers::FindInSendTable ( const char *  classname,
const char *  offset 
) [pure virtual]

Deprecated; use FindSendPropInfo() instead.

Parameters:
classname Do not use.
offset Do not use.
Returns:
Do not use.

virtual ServerClass* SourceMod::IGameHelpers::FindServerClass ( const char *  classname  )  [pure virtual]

Finds a named server class.

Returns:
ServerClass pointer on success, NULL on failure.

virtual typedescription_t* SourceMod::IGameHelpers::FindInDataMap ( datamap_t *  pMap,
const char *  offset 
) [pure virtual]

Finds a datamap_t definition.

Parameters:
pMap datamap_t pointer.
offset Property name.
Returns:
typedescription_t pointer on success, NULL on failure.

virtual datamap_t* SourceMod::IGameHelpers::GetDataMap ( CBaseEntity *  pEntity  )  [pure virtual]

Retrieves an entity's datamap_t pointer.

Parameters:
pEntity CBaseEntity entity.
Returns:
datamap_t pointer, or NULL on failure.

virtual void SourceMod::IGameHelpers::SetEdictStateChanged ( edict_t *  pEdict,
unsigned short  offset 
) [pure virtual]

Marks an edict as state changed for an offset.

Parameters:
pEdict Edict pointer.
offset Offset index.

virtual bool SourceMod::IGameHelpers::TextMsg ( int  client,
int  dest,
const char *  msg 
) [pure virtual]

Sends a text message to a client.

Parameters:
client Client index.
dest Destination on the HUD.
msg Message to send.
Returns:
True on success, false on failure.

virtual bool SourceMod::IGameHelpers::IsLANServer (  )  [pure virtual]

Returns whether the server ls a LAN server.

Returns:
True if LAN server, false otherwise.

virtual bool SourceMod::IGameHelpers::FindSendPropInfo ( const char *  classname,
const char *  offset,
sm_sendprop_info_t info 
) [pure virtual]

Finds a send property in a named ServerClass.

This version, unlike FindInSendTable(), correctly deduces the offsets of nested tables.

Parameters:
classname ServerClass name (such as CBasePlayer).
offset Offset name (such as m_iAmmo).
info Buffer to store sm_sendprop_info_t data.
Returns:
True on success, false on failure.

virtual edict_t* SourceMod::IGameHelpers::EdictOfIndex ( int  index  )  [pure virtual]

Converts an entity index into an edict pointer.

Parameters:
index Entity Index.
Returns:
Edict pointer or NULL on failure.

virtual int SourceMod::IGameHelpers::IndexOfEdict ( edict_t *  pEnt  )  [pure virtual]

Converts an edict pointer into an entity index.

Parameters:
index Edict Pointer.
Returns:
Entity index or -1 on failure.

virtual edict_t* SourceMod::IGameHelpers::GetHandleEntity ( CBaseHandle &  hndl  )  [pure virtual]

Retrieves the edict pointer from a CBaseHandle object.

Parameters:
hndl CBaseHandle object.
Returns:
Edict pointer or NULL on failure.

virtual void SourceMod::IGameHelpers::SetHandleEntity ( CBaseHandle &  hndl,
edict_t *  pEnt 
) [pure virtual]

Sets the edict pointer in a CBaseHandle object.

Parameters:
hndl CBaseHandle object.
pEnt Edict pointer.

virtual const char* SourceMod::IGameHelpers::GetCurrentMap (  )  [pure virtual]

Returns the current map name.

Returns:
Current map name.

virtual void SourceMod::IGameHelpers::ServerCommand ( const char *  buffer  )  [pure virtual]

Wraps IVEngineServer::ServerCommand.

Parameters:
buffer Command buffer (does not auto
terminate).


The documentation for this class was generated from the following file:
Generated on Thu Mar 5 14:05:26 2009 for SourceMod SDK by  doxygen 1.5.1