Updated stub_mm and sample_mm to use MMSOURCE17 as the environment/Makefile variable.
3 * ======================================================
4 * Metamod:Source Stub Plugin
5 * Written by AlliedModders LLC.
6 * ======================================================
8 * This software is provided 'as-is', without any express or implied warranty.
9 * In no event will the authors be held liable for any damages arising from
10 * the use of this software.
12 * This stub plugin is public domain.
20 SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t *, int, int);
22 StubPlugin g_StubPlugin;
23 IServerGameDLL *server = NULL;
25 PLUGIN_EXPOSE(StubPlugin, g_StubPlugin);
26 bool StubPlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late)
30 /* Make sure we build on MM:S 1.4 */
31 #if defined METAMOD_PLAPI_VERSION
32 GET_V_IFACE_ANY(GetServerFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
34 GET_V_IFACE_ANY(serverFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
37 SH_ADD_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, server, Hook_ServerActivate, true);
42 bool StubPlugin::Unload(char *error, size_t maxlen)
44 SH_REMOVE_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, server, Hook_ServerActivate, true);
49 void Hook_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
51 META_LOG(g_PLAPI, "ServerActivate() called: edictCount = %d, clientMax = %d", edictCount, clientMax);
54 void StubPlugin::AllPluginsLoaded()
56 /* This is where we'd do stuff that relies on the mod or other plugins
57 * being initialized (for example, cvars added and events registered).
61 bool StubPlugin::Pause(char *error, size_t maxlen)
66 bool StubPlugin::Unpause(char *error, size_t maxlen)
71 const char *StubPlugin::GetLicense()
73 return "Public Domain";
76 const char *StubPlugin::GetVersion()
81 const char *StubPlugin::GetDate()
86 const char *StubPlugin::GetLogTag()
91 const char *StubPlugin::GetAuthor()
93 return "AlliedModders LLC";
96 const char *StubPlugin::GetDescription()
98 return "Sample empty plugin";
101 const char *StubPlugin::GetName()
103 return "Stub Plugin";
106 const char *StubPlugin::GetURL()
108 return "http://www.sourcemm.net/";