32 #ifndef _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
33 #define _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
42 #define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers"
43 #define SMINTERFACE_GAMEHELPERS_VERSION 10
52 struct typedescription_t;
54 #define TEXTMSG_DEST_NOTIFY 1
55 #define TEXTMSG_DEST_CONSOLE 2
56 #define TEXTMSG_DEST_CHAT 3
57 #define TEXTMSG_DEST_CENTER 4
81 return SMINTERFACE_GAMEHELPERS_NAME;
85 return SMINTERFACE_GAMEHELPERS_VERSION;
95 virtual SendProp *
FindInSendTable(
const char *classname,
const char *offset) =0;
112 virtual typedescription_t *
FindInDataMap(datamap_t *pMap,
const char *offset) =0;
120 virtual datamap_t *
GetDataMap(CBaseEntity *pEntity) =0;
138 virtual bool TextMsg(
int client,
int dest,
const char *msg) =0;
276 virtual void AddDelayedKick(
int client,
int userid,
const char *msg) =0;
293 virtual bool HintTextMsg(
int client,
const char *msg) =0;
341 #endif //_INCLUDE_SOURCEMOD_GAMEHELPERS_H_
SendProp * prop
Definition: IGameHelpers.h:66
virtual const char * GetEntityClassname(edict_t *pEdict)=0
Gets a Classname from an edict_t pointer.
virtual bool TextMsg(int client, int dest, const char *msg)=0
Sends a text message to a client.
virtual void AddDelayedKick(int client, int userid, const char *msg)=0
Adds a client to the kick queue, where they will be kicked next game frame.
virtual ServerClass * FindServerClass(const char *classname)=0
Finds a named server class.
virtual cell_t EntityToBCompatRef(CBaseEntity *pEntity)=0
Returns the entity reference for logical entities, or the index for networked entities.
virtual void * GetGlobalEntityList()=0
Returns the g_EntList pointer.
virtual bool IsLANServer()=0
Returns whether the server ls a LAN server.
virtual void ServerCommand(const char *buffer)=0
Wraps IVEngineServer::ServerCommand.
unsigned int actual_offset
Definition: IGameHelpers.h:67
virtual edict_t * EdictOfIndex(int index)=0
Converts an entity index into an edict pointer.
Defines the Share System, responsible for shared resources and dependencies.
virtual void SetHandleEntity(CBaseHandle &hndl, edict_t *pEnt)=0
Sets the edict pointer in a CBaseHandle object.
virtual unsigned int GetInterfaceVersion()
Must return an integer defining the interface's version.
Definition: IGameHelpers.h:83
virtual bool IsMapValid(const char *map)=0
Returns whether or not a map name is valid to use with the engine's Changelevel functionality. It need not be an exact filename on some engines. For a check on the exact name, use IVEngineServer::IsMapValid.
Defines the base functionality required by a shared interface.
Definition: IShareSys.h:92
virtual int IndexOfEdict(edict_t *pEnt)=0
Converts an edict pointer into an entity index.
virtual bool HintTextMsg(int client, const char *msg)=0
Sends a hint message to a client.
Maps the heirarchy of a SendProp.
Definition: IGameHelpers.h:64
virtual cell_t EntityToReference(CBaseEntity *pEntity)=0
Returns the entity reference for an entity.
virtual int GetSendPropOffset(SendProp *prop)=0
Returns the uncomputed offset of a SendProp.
virtual cell_t ReferenceToBCompatRef(cell_t entRef)=0
Converts a reference into a bcompat version (index for networked entities).
virtual const char * GetInterfaceName()
Must return a string defining the interface's unique name.
Definition: IGameHelpers.h:79
virtual cell_t IndexToReference(int entIndex)=0
Converts an entity index into an entity reference.
virtual SendProp * FindInSendTable(const char *classname, const char *offset)=0
Deprecated; use FindSendPropInfo() instead.
virtual const char * GetCurrentMap()=0
Returns the current map name.
Definition: IAdminSystem.h:63
virtual bool FindSendPropInfo(const char *classname, const char *offset, sm_sendprop_info_t *info)=0
Finds a send property in a named ServerClass.
virtual bool FindDataMapInfo(datamap_t *pMap, const char *offset, sm_datatable_info_t *pDataTable)=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 ICommandLine * GetValveCommandLine()=0
Retrieves the Valve command line pointer.
Definition: IGameHelpers.h:76
virtual CBaseEntity * ReferenceToEntity(cell_t entRef)=0
Looks up a reference and returns the CBasseEntity* it points to.
virtual int ReferenceToIndex(cell_t entRef)=0
Retrieves the entity index from a reference.
virtual edict_t * GetHandleEntity(CBaseHandle &hndl)=0
Retrieves the edict pointer from a CBaseHandle object.
Definition: IGameHelpers.h:70
virtual typedescription_t * FindInDataMap(datamap_t *pMap, const char *offset)=0
Finds a datamap_t definition.
typedescription_t * prop
Definition: IGameHelpers.h:72
unsigned int actual_offset
Definition: IGameHelpers.h:73