3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #ifndef _INCLUDE_SOURCEMOD_MM_API_H_
16 #define _INCLUDE_SOURCEMOD_MM_API_H_
18 #include "convar_sm.h"
19 #include <ISmmPlugin.h>
21 #include <igameevents.h>
22 #include <iplayerinfo.h>
24 #include <filesystem.h>
27 * @file Contains wrappers around required Metamod:Source API exports
30 class SourceMod_Core : public ISmmPlugin
33 bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
34 bool Unload(char *error, size_t maxlen);
35 bool Pause(char *error, size_t maxlen);
36 bool Unpause(char *error, size_t maxlen);
37 void AllPluginsLoaded();
39 const char *GetAuthor();
40 const char *GetName();
41 const char *GetDescription();
43 const char *GetLicense();
44 const char *GetVersion();
45 const char *GetDate();
46 const char *GetLogTag();
49 extern SourceMod_Core g_SourceMod_Core;
50 extern IVEngineServer *engine;
51 extern IServerGameDLL *gamedll;
52 extern IServerGameClients *serverClients;
54 extern ISmmPluginManager *g_pMMPlugins;
55 extern CGlobalVars *gpGlobals;
56 extern IGameEventManager2 *gameevents;
57 extern SourceHook::CallClass<IVEngineServer> *enginePatch;
58 extern SourceHook::CallClass<IServerGameDLL> *gamedllPatch;
59 extern IUniformRandomStream *engrandom;
60 extern IPlayerInfoManager *playerinfo;
61 extern IBaseFileSystem *basefilesystem;
63 #define ENGINE_CALL(func) SH_CALL(enginePatch, &IVEngineServer::func)
64 #define SERVER_CALL(func) SH_CALL(gamedllPatch, &IServerGameDLL::func)
68 #endif //_INCLUDE_SOURCEMOD_MM_API_H_