2 #ifndef _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
3 #define _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
7 * @brief Sample extension code header.
11 #include "smsdk_ext.h"
15 * @brief Sample implementation of the SDK Extension.
16 * Note: Uncomment one of the pre-defined virtual functions in order to use it.
18 class Sample : public SDKExtension
22 * @brief This is called after the initial loading sequence has been processed.
24 * @param error Error message buffer.
25 * @param err_max Size of error message buffer.
26 * @param late Whether or not the module was loaded after map load.
27 * @return True to succeed loading, false to fail.
29 //virtual bool SDK_OnLoad(char *error, size_t err_max, bool late);
32 * @brief This is called right before the extension is unloaded.
34 //virtual void SDK_OnUnload();
37 * @brief This is called once all known extensions have been loaded.
38 * Note: It is is a good idea to add natives here, if any are provided.
40 //virtual void SDK_OnAllLoaded();
43 * @brief Called when the pause state is changed.
45 //virtual void SDK_OnPauseChange(bool paused);
48 * @brief this is called when Core wants to know if your extension is working.
50 * @param error Error message buffer.
51 * @param err_max Size of error message buffer.
52 * @return True if working, false otherwise.
54 //virtual void QueryRunning(char *error, size_t maxlength);
56 #if defined SMEXT_CONF_METAMOD
58 * Read smext_base.h for documentation on these.
61 //virtual bool SDK_OnMetamodLoad(char *error, size_t err_max, bool late);
62 //virtual bool SDK_OnMetamodUnload(char *error, size_t err_max);
63 //virtual bool SDK_OnMetamodPauseChange(bool paused, char *error, size_t err_max);
67 #endif //_INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_