2 * ===============================================================
3 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
4 * ===============================================================
6 * This file is not open source and may not be copied without explicit
7 * written permission of AlliedModders LLC. This file may not be redistributed
8 * in whole or significant part.
9 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
14 #ifndef _INCLUDE_SOURCEMOD_MM_API_H_
15 #define _INCLUDE_SOURCEMOD_MM_API_H_
17 #include "convar_sm.h"
18 #include <ISmmPlugin.h>
21 #include <igameevents.h>
25 * @file Contains wrappers around required Metamod:Source API exports
28 class SourceMod_Core : public ISmmPlugin
31 bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
32 bool Unload(char *error, size_t maxlen);
33 bool Pause(char *error, size_t maxlen);
34 bool Unpause(char *error, size_t maxlen);
35 void AllPluginsLoaded();
37 const char *GetAuthor();
38 const char *GetName();
39 const char *GetDescription();
41 const char *GetLicense();
42 const char *GetVersion();
43 const char *GetDate();
44 const char *GetLogTag();
47 extern SourceMod_Core g_SourceMod_Core;
48 extern IVEngineServer *engine;
49 extern IServerGameDLL *gamedll;
50 extern IServerGameClients *serverClients;
52 extern ISmmPluginManager *g_pMMPlugins;
53 extern CGlobalVars *gpGlobals;
54 extern IGameEventManager2 *gameevents;
55 extern SourceHook::CallClass<IVEngineServer> *enginePatch;
56 extern IUniformRandomStream *engrandom;
58 #define ENGINE_CALL(func) SH_CALL(enginePatch, &IVEngineServer::func)
62 #endif //_INCLUDE_SOURCEMOD_MM_API_H_