sample plugin import
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40170
This commit is contained in:
parent
e060af14b4
commit
55266ffb80
58
plugins/include/sourcemod.inc
Normal file
58
plugins/include/sourcemod.inc
Normal 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
16
plugins/test.sma
Normal 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user