Trigger build for hl2sdk-l4d changes.
2 * vim: set ts=4 sw=4 tw=99 noet :
3 * ======================================================
4 * Metamod:Source Sample 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 sample plugin is public domain.
15 #ifndef _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_
16 #define _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_
18 #include <ISmmPlugin.h>
19 #include <igameevents.h>
20 #include <iplayerinfo.h>
21 #include <sh_vector.h>
22 #include "engine_wrappers.h"
24 #if defined WIN32 && !defined snprintf
25 #define snprintf _snprintf
28 class SamplePlugin : public ISmmPlugin, public IMetamodListener
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();
36 public: //IMetamodListener stuff
37 void OnVSPListening(IServerPluginCallbacks *iface);
39 void Hook_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax);
40 bool Hook_LevelInit(const char *pMapName,
41 char const *pMapEntities,
42 char const *pOldLevel,
43 char const *pLandmarkName,
46 void Hook_GameFrame(bool simulating);
47 void Hook_LevelShutdown(void);
48 void Hook_ClientActive(edict_t *pEntity, bool bLoadGame);
49 void Hook_ClientDisconnect(edict_t *pEntity);
50 void Hook_ClientPutInServer(edict_t *pEntity, char const *playername);
51 void Hook_SetCommandClient(int index);
52 void Hook_ClientSettingsChanged(edict_t *pEdict);
53 bool Hook_ClientConnect(edict_t *pEntity,
55 const char *pszAddress,
58 #if SOURCE_ENGINE >= SE_ORANGEBOX
59 void Hook_ClientCommand(edict_t *pEntity, const CCommand &args);
61 void Hook_ClientCommand(edict_t *pEntity);
64 const char *GetAuthor();
65 const char *GetName();
66 const char *GetDescription();
68 const char *GetLicense();
69 const char *GetVersion();
70 const char *GetDate();
71 const char *GetLogTag();
74 extern SamplePlugin g_SamplePlugin;
78 #endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_