diff --git a/plugins/include/sourcemod.inc b/plugins/include/sourcemod.inc new file mode 100644 index 00000000..dcef839d --- /dev/null +++ b/plugins/include/sourcemod.inc @@ -0,0 +1,58 @@ +/** + * :TODO: license info + */ + +#if defined _sourcemod_included + #endinput +#endif +#define _sourcemod_included + +/** + * Note: A plugin can define the following public strings for external information: + * public String:PLUGIN_AUTHOR[] - Author + * public String:PLUGIN_NAME[] - Name/Title + * public String:PLUGIN_DESCRIPTION[] - Short Description + * public String:PLUGIN_VERSION[] - Version information + * public String:PLUGIN_URL[] - Website URL + */ + + +/** + * Called when the plugin is fully initialized and all known external references are resolved, + * such as dynamic natives. + * + * @noreturn + */ +forward OnPluginInit(); + +/** + * Called before OnPluginInit, in case the plugin wants to check for load failure. + * + * @param myself Handle to the plugin. + * @param late Whether or not the plugin was loaded "late" (after map load). + * @param error Error message buffer in case load failed. + * @param err_max Maximum number of characters for error message buffer. + * @return True if load success, false otherwise. + */ +forward bool:OnPluginLoad(Handle:myself, bool:late, String:error[], err_max); + +/** + * Called when the plugin is first mapped into memory. Use this to set dynamic natives. + * + * @noreturn + */ +forward OnPluginCreated(); + +/** + * Called when the plugin is about to be unloaded. + * + * @noreturn + */ +forward OnPluginUnload(); + +/** + * Called when the plugin's pause status is changing. + * + * @noreturn + */ +forward OnPluginPauseChange(bool:pause); diff --git a/plugins/test.sma b/plugins/test.sma new file mode 100644 index 00000000..e0837709 --- /dev/null +++ b/plugins/test.sma @@ -0,0 +1,16 @@ +#include <sourcemod> + +/** + * I don't know if I like this yet.... + */ +public String:PLUGIN_NAME[] = "Testcrab" +public String:PLUGIN_AUTHOR[] = "BAILOPAN" +public String:PLUGIN_VERSION[] = "0.0.0.0" +public String:PLUGIN_URL[] = "http://www.sourcemod.net/" +public String:PUBLIC_DESCRIPTION[] = "A test, fool" + +public OnPluginInit() +{ + /* just a test, mommy */ + return 5 +}