sample plugin import

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40170
This commit is contained in:
David Anderson 2006-11-08 09:28:32 +00:00
parent e060af14b4
commit 55266ffb80
2 changed files with 74 additions and 0 deletions

View File

@ -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);

16
plugins/test.sma Normal file
View File

@ -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
}