Added check to make sure player are alive to perform sm_slap, sm_burn, sm_slay.
3 * ================================================================
5 * Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
6 * ================================================================
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License,
10 * version 3.0, as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to
21 * link the code of this program (as well as its derivative works) to
22 * "Half-Life 2," the "Source Engine," the "SourcePawn JIT," and any
23 * Game MODs that run on software by the Valve Corporation. You must
24 * obey the GNU General Public License in all respects for all other
25 * code used. Additionally, AlliedModders LLC grants this exception
26 * to all derivative works. AlliedModders LLC defines further
27 * exceptions, found in LICENSE.txt (as of this writing, version
28 * JULY-31-2007), or <http://www.sourcemod.net/license.php>.
33 #ifndef _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
34 #define _INCLUDE_SOURCEMOD_GAMEHELPERS_H_
36 #include <IShareSys.h>
38 #include <server_class.h>
42 #define SMINTERFACE_GAMEHELPERS_NAME "IGameHelpers"
43 #define SMINTERFACE_GAMEHELPERS_VERSION 1
46 * @file IGameHelpers.h
47 * @brief Provides Source helper functions.
52 class IGameHelpers : public SMInterface
55 virtual const char *GetInterfaceName()
57 return SMINTERFACE_GAMEHELPERS_NAME;
59 virtual unsigned int GetInterfaceVersion()
61 return SMINTERFACE_GAMEHELPERS_VERSION;
65 * @brief Finds a send property in a named send table.
67 * @param classname Top-level sendtable name.
68 * @param offset Property name.
69 * @return SendProp pointer on success, NULL on failure.
71 virtual SendProp *FindInSendTable(const char *classname, const char *offset) =0;
74 * @brief Finds a named server class.
76 * @return ServerClass pointer on success, NULL on failure.
78 virtual ServerClass *FindServerClass(const char *classname) =0;
81 * @brief Finds a datamap_t definition.
83 * @param pMap datamap_t pointer.
84 * @param offset Property name.
85 * @return typedescription_t pointer on success, NULL
88 virtual typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset) =0;
91 * @brief Retrieves an entity's datamap_t pointer.
93 * @param pEntity CBaseEntity entity.
94 * @return datamap_t pointer, or NULL on failure.
96 virtual datamap_t *GetDataMap(CBaseEntity *pEntity) =0;
99 * @brief Marks an edict as state changed for an offset.
101 * @param pEdict Edict pointer.
102 * @param offset Offset index.
104 virtual void SetEdictStateChanged(edict_t *pEdict, unsigned short offset) =0;
107 * @brief Sends a text message to a client.
109 * @param client Client index.
110 * @param dest Destination on the HUD.
111 * @param msg Message to send.
112 * @return True on success, false on failure.
114 virtual bool TextMsg(int client, int dest, const char *msg) =0;
118 #endif //_INCLUDE_SOURCEMOD_GAMEHELPERS_H_