imported new API for exposing plugin info
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40175
This commit is contained in:
parent
f43b4468c6
commit
c89dd6f101
@ -7,15 +7,26 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _sourcemod_included
|
#define _sourcemod_included
|
||||||
|
|
||||||
/**
|
struct Plugin
|
||||||
* Note: A plugin can define the following public strings for external information:
|
{
|
||||||
* public String:PLUGIN_AUTHOR[] - Author
|
const String:name[], /* Plugin Name */
|
||||||
* public String:PLUGIN_NAME[] - Name/Title
|
const String:description[], /* Plugin Description */
|
||||||
* public String:PLUGIN_DESCRIPTION[] - Short Description
|
const String:author[], /* Plugin Author */
|
||||||
* public String:PLUGIN_VERSION[] - Version information
|
const String:version[], /* Plugin Version */
|
||||||
* public String:PLUGIN_URL[] - Website URL
|
const String:url[], /* Plugin URL */
|
||||||
*/
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Declare this as a struct in your plugin to expose its information.
|
||||||
|
* Example:
|
||||||
|
*
|
||||||
|
* public Plugin:myinfo =
|
||||||
|
* {
|
||||||
|
* name = "My Plugin",
|
||||||
|
* //etc
|
||||||
|
* };
|
||||||
|
*/
|
||||||
|
public Plugin:myinfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the plugin is fully initialized and all known external references are resolved,
|
* Called when the plugin is fully initialized and all known external references are resolved,
|
||||||
@ -37,11 +48,11 @@ forward OnPluginInit();
|
|||||||
forward bool:OnPluginLoad(Handle:myself, bool:late, String:error[], err_max);
|
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.
|
* Called when the plugin is first mapped into memory. Use this to set dynamic natives ONLY.
|
||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
forward OnPluginCreated();
|
forward OnPluginRequirements();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the plugin is about to be unloaded.
|
* Called when the plugin is about to be unloaded.
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
|
|
||||||
/**
|
public Plugin:myinfo
|
||||||
* I don't know if I like this yet....
|
{
|
||||||
*/
|
name = "Test Plugin",
|
||||||
public String:PLUGIN_NAME[] = "Testcrab"
|
author = "BAILOPAN",
|
||||||
public String:PLUGIN_AUTHOR[] = "BAILOPAN"
|
description = "Tests Stuff",
|
||||||
public String:PLUGIN_VERSION[] = "0.0.0.0"
|
version = "1.0.0.0",
|
||||||
public String:PLUGIN_URL[] = "http://www.sourcemod.net/"
|
url = "http://www.sourceomd.net/"
|
||||||
public String:PUBLIC_DESCRIPTION[] = "A test, fool"
|
}
|
||||||
|
|
||||||
public OnPluginInit()
|
public OnPluginInit()
|
||||||
{
|
{
|
||||||
/* just a test, mommy */
|
/* just a test, mommy */
|
||||||
return 5
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user