plugins/include/sourcemod.inc
author David Anderson <dvander@alliedmods.net>
Tue Oct 02 14:48:44 2007 +0000 (2007-10-02)
changeset 1525 bca151238f5e
parent 1423 e73b3563f254
child 1572 adbc41dc9cd0
permissions -rw-r--r--
- removed incorrect information about DrawOption, renamed to DisplayOption
- renamed DrawTitle to DisplayTitle
dvander@429
     1
/**
ds@475
     2
 * vim: set ts=4 :
ds@1330
     3
 * =============================================================================
dvander@429
     4
 * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
ds@1330
     5
 * =============================================================================
ds@1330
     6
 *
ds@1330
     7
 * This file is part of the SourceMod/SourcePawn SDK.
dvander@429
     8
 *
ds@1330
     9
 * This program is free software; you can redistribute it and/or modify it under
ds@1330
    10
 * the terms of the GNU General Public License, version 3.0, as published by the
ds@1330
    11
 * Free Software Foundation.
ds@1330
    12
 * 
ds@1330
    13
 * This program is distributed in the hope that it will be useful, but WITHOUT
ds@1330
    14
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
ds@1330
    15
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
ds@1330
    16
 * details.
ds@1330
    17
 *
ds@1330
    18
 * You should have received a copy of the GNU General Public License along with
ds@1330
    19
 * this program.  If not, see <http://www.gnu.org/licenses/>.
ds@1330
    20
 *
ds@1330
    21
 * As a special exception, AlliedModders LLC gives you permission to link the
ds@1330
    22
 * code of this program (as well as its derivative works) to "Half-Life 2," the
ds@1330
    23
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
ds@1330
    24
 * by the Valve Corporation.  You must obey the GNU General Public License in
ds@1330
    25
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
ds@1330
    26
 * this exception to all derivative works.  AlliedModders LLC defines further
ds@1330
    27
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
ds@1330
    28
 * or <http://www.sourcemod.net/license.php>.
dvander@429
    29
 *
faluco@506
    30
 * Version: $Id$
dvander@429
    31
 */
dvander@429
    32
dvander@429
    33
#if defined _sourcemod_included
dvander@429
    34
 #endinput
dvander@429
    35
#endif
dvander@429
    36
#define _sourcemod_included
dvander@429
    37
dvander@619
    38
/**
dvander@619
    39
 * Plugin public information.
dvander@619
    40
 */
dvander@429
    41
struct Plugin
dvander@429
    42
{
dvander@619
    43
   const String:name[],			/**< Plugin Name */
dvander@619
    44
   const String:description[],	/**< Plugin Description */
dvander@619
    45
   const String:author[],		/**< Plugin Author */
dvander@619
    46
   const String:version[],		/**< Plugin Version */
dvander@619
    47
   const String:url[],			/**< Plugin URL */
dvander@429
    48
};
dvander@429
    49
dvander@429
    50
#include <core>
dvander@429
    51
#include <float>
dvander@1069
    52
#include <vector>
ds@873
    53
#include <string>
dvander@429
    54
#include <handles>
dvander@601
    55
#include <functions>
ds@873
    56
#include <files>
dvander@643
    57
#include <timers>
ds@873
    58
#include <admin>
dvander@868
    59
#include <dbi>
ds@913
    60
#include <lang>
ds@873
    61
#include <sorting>
ds@913
    62
#include <textparse>
ds@873
    63
#include <clients>
ds@873
    64
#include <console>
ds@873
    65
#include <events>
ds@873
    66
#include <bitbuffer>
ds@873
    67
#include <usermessages>
ds@913
    68
#include <keyvalues>
ds@873
    69
#include <menus>
ds@898
    70
#include <halflife>
dvander@1156
    71
#include <adt>
dvander@1423
    72
#include <banning>
ds@898
    73
dvander@429
    74
/**
dvander@429
    75
 * Declare this as a struct in your plugin to expose its information.
dvander@429
    76
 * Example:
dvander@429
    77
 *
dvander@429
    78
 * public Plugin:myinfo =
dvander@429
    79
 * {
dvander@429
    80
 *    name = "My Plugin",
dvander@429
    81
 *    //etc
dvander@429
    82
 * };
dvander@429
    83
 */
dvander@429
    84
public Plugin:myinfo;
dvander@429
    85
 
dvander@429
    86
/**
dvander@429
    87
 * Called when the plugin is fully initialized and all known external references are resolved.
dvander@429
    88
 * This is called even if the plugin type is "private."
dvander@619
    89
 * @note Errors in this function will cause the plugin to stop running.
dvander@429
    90
 *
dvander@429
    91
 * @noreturn
dvander@429
    92
 */
dvander@536
    93
forward OnPluginStart();
dvander@429
    94
 
dvander@429
    95
/**
dvander@979
    96
 * Called before OnPluginStart, in case the plugin wants to check for load failure.
dvander@429
    97
 * This is called even if the plugin type is "private."  Any natives from modules are 
dvander@429
    98
 * not available at this point.  Thus, this forward should only be used for explicit 
dvander@429
    99
 * pre-emptive things, such as adding dynamic natives, or setting certain types of load filters.
dvander@429
   100
 * 
dvander@619
   101
 * @note It is not safe to call externally resolved natives until OnPluginStart().
dvander@619
   102
 * @note Any sort of RTE in this function will cause the plugin to fail loading.
dvander@429
   103
 *
dvander@429
   104
 * @param myself	Handle to the plugin.
dvander@429
   105
 * @param late		Whether or not the plugin was loaded "late" (after map load).
dvander@429
   106
 * @param error		Error message buffer in case load failed.
dvander@429
   107
 * @param err_max	Maximum number of characters for error message buffer.
dvander@429
   108
 * @return			True if load success, false otherwise.
dvander@429
   109
 */
dvander@429
   110
forward bool:AskPluginLoad(Handle:myself, bool:late, String:error[], err_max);
dvander@429
   111
dvander@429
   112
/**
dvander@429
   113
 * Called when the plugin is about to be unloaded.
dvander@429
   114
 *
dvander@429
   115
 * @noreturn
dvander@429
   116
 */
dvander@429
   117
forward OnPluginEnd();
dvander@429
   118
dvander@429
   119
/**
dvander@429
   120
 * Called when the plugin's pause status is changing.
dvander@429
   121
 *
ds@475
   122
 * @param pause			True if the plugin is being paused, false otherwise.
dvander@429
   123
 * @noreturn
dvander@429
   124
 */
dvander@429
   125
forward OnPluginPauseChange(bool:pause);
dvander@429
   126
dvander@429
   127
/**
dvander@531
   128
 * Called before every server frame.  Note that you should avoid
dvander@531
   129
 * doing expensive computations here, and you should declare large
dvander@531
   130
 * local arrays using 'decl' instead of 'new'.
dvander@531
   131
 */
dvander@531
   132
forward OnGameFrame();
dvander@531
   133
dvander@531
   134
/**
dvander@717
   135
 * Called when the map is loaded.
dvander@717
   136
 *
dvander@723
   137
 * @note This used to be OnServerLoad(), which is now deprecated.
dvander@717
   138
 * Plugins still using the old forward will work.
dvander@643
   139
 */
dvander@717
   140
forward OnMapStart();
dvander@643
   141
dvander@643
   142
/**
dvander@718
   143
 * Called right before a map ends.
dvander@718
   144
 */
dvander@718
   145
forward OnMapEnd();
dvander@718
   146
dvander@718
   147
/**
dvander@978
   148
 * Called when the map has loaded, servercfgfile (server.cfg) has been 
dvander@978
   149
 * executed, and all plugin configs are done executing.  This is the best
dvander@978
   150
 * place to inialize plugin functions which are based on cvar data.  
dvander@723
   151
 *
dvander@978
   152
 * @note This will always be called once and only once per map.  It will be 
dvander@978
   153
 * called after OnMapStart().
dvander@978
   154
 *
dvander@978
   155
 * @noreturn
dvander@723
   156
 */
dvander@978
   157
forward OnConfigsExecuted();
dvander@723
   158
dvander@723
   159
/**
dvander@979
   160
 * @deprecated Use OnConfigsExecuted() instead.
dvander@979
   161
 */
ds@1268
   162
#pragma deprecated Use OnConfigsExecuted() instead
dvander@979
   163
forward OnServerCfg();
dvander@979
   164
dvander@979
   165
/**
faluco@1221
   166
 * Called after all plugins have been loaded.
faluco@1221
   167
 */
faluco@1221
   168
forward OnAllPluginsLoaded();
faluco@1221
   169
faluco@1221
   170
/**
dvander@1378
   171
 * Called when an action is going to be logged.
dvander@1378
   172
 *
dvander@1378
   173
 * @param source		Handle to the object logging the action, or INVALID_HANDLE 
dvander@1378
   174
 *						if Core is logging the action.
dvander@1378
   175
 * @param ident			Type of object logging the action (plugin, ext, or core).
dvander@1378
   176
 * @param client		Client the action is from; 0 for server, -1 if not applicable.
dvander@1378
   177
 * @param target		Client the action is targetting, or -1 if not applicable.
dvander@1378
   178
 * @param message		Message that is being logged.
dvander@1378
   179
 * @return				Plugin_Continue will cause Core to defaulty log the message.
dvander@1378
   180
 *						Plugin_Handled will stop Core from logging the message.
dvander@1378
   181
 * 						Plugin_Stop is the same as Handled, but prevents any other 
dvander@1378
   182
 *						plugins from handling the message.
dvander@1378
   183
 */
dvander@1378
   184
forward Action:OnLogAction(Handle:source, 
dvander@1378
   185
						   Identity:ident,
dvander@1378
   186
						   client,
dvander@1378
   187
						   target,
dvander@1378
   188
						   const String:message[]);
dvander@1378
   189
dvander@1378
   190
/**
dvander@536
   191
 * Returns the calling plugin's Handle.
dvander@536
   192
 *
dvander@536
   193
 * @return				Handle of the calling plugin.
dvander@536
   194
 */
dvander@536
   195
native Handle:GetMyHandle();
dvander@536
   196
dvander@618
   197
/**
dvander@618
   198
 * Returns an iterator that can be used to search through plugins.
dvander@618
   199
 *
dvander@618
   200
 * @return				Handle to iterate with.  Must be closed via 
dvander@618
   201
 * 						CloseHandle().
dvander@618
   202
 * @error				Invalid Handle.
dvander@618
   203
 */
dvander@618
   204
native Handle:GetPluginIterator();
dvander@618
   205
dvander@618
   206
/**
dvander@618
   207
 * Returns whether there are more plugins available in the iterator.
dvander@618
   208
 *
dvander@618
   209
 * @param iter			Handle to the plugin iterator.
dvander@618
   210
 * @return				True on more plugins, false otherwise.
dvander@618
   211
 * @error				Invalid Handle.
dvander@618
   212
 */
dvander@618
   213
native bool:MorePlugins(Handle:iter);
dvander@618
   214
dvander@618
   215
/**
dvander@618
   216
 * Returns the current plugin in the iterator and advances the iterator.
dvander@618
   217
 *
dvander@618
   218
 * @param iter			Handle to the plugin iterator.
dvander@618
   219
 * @return				Current plugin the iterator is at, before
dvander@618
   220
 *						the iterator is advanced.
dvander@618
   221
 * @error				Invalid Handle.
dvander@618
   222
 */
dvander@618
   223
native Handle:ReadPlugin(Handle:iter);
dvander@618
   224
dvander@618
   225
/**
dvander@618
   226
 * Returns a plugin's status.
dvander@618
   227
 *
dvander@618
   228
 * @param plugin		Plugin Handle (INVALID_HANDLE uses the calling plugin).
dvander@618
   229
 * @return				Status code for the plugin.
dvander@618
   230
 * @error				Invalid Handle.
dvander@618
   231
 */
dvander@618
   232
native PluginStatus:GetPluginStatus(Handle:plugin);
dvander@618
   233
dvander@618
   234
/**
dvander@618
   235
 * Retrieves a plugin's file name relative to the plugins folder.
dvander@618
   236
 *
dvander@618
   237
 * @param plugin		Plugin Handle (INVALID_HANDLE uses the calling plugin).
dvander@618
   238
 * @param buffer		Buffer to the store the file name.
dvander@618
   239
 * @param maxlength		Maximum length of the name buffer.
dvander@618
   240
 * @noreturn
dvander@618
   241
 * @error				Invalid Handle.
dvander@618
   242
 */
dvander@618
   243
native GetPluginFilename(Handle:plugin, String:buffer[], maxlength);
dvander@618
   244
dvander@618
   245
/**
dvander@618
   246
 * Retrieves whether or not a plugin is being debugged.
dvander@618
   247
 *
dvander@618
   248
 * @param plugin		Plugin Handle (INVALID_HANDLE uses the calling plugin).
dvander@618
   249
 * @return				True if being debugged, false otherwise.
dvander@618
   250
 * @error				Invalid Handle.
dvander@618
   251
 */
dvander@618
   252
native bool:IsPluginDebugging(Handle:hndl);
dvander@618
   253
dvander@618
   254
/**
dvander@618
   255
 * Retrieves a plugin's public info.
dvander@618
   256
 *
dvander@618
   257
 * @param plugin		Plugin Handle (INVALID_HANDLE uses the calling plugin).
dvander@618
   258
 * @param info			Plugin info property to retrieve.
dvander@618
   259
 * @param buffer		Buffer to store info in.
dvander@618
   260
 * @param maxlength		Maximum length of buffer.
dvander@618
   261
 * @return				True on success, false if property is not available.
dvander@618
   262
 * @error				Invalid Handle.
dvander@618
   263
 */
dvander@618
   264
native bool:GetPluginInfo(Handle:plugin, PluginInfo:info, String:buffer[], maxlength);
dvander@560
   265
dvander@560
   266
/**
dvander@837
   267
 * Causes the plugin to enter a failed state.  An error will be thrown and
dvander@837
   268
 * the plugin will be paused until it is unloaded or reloaded.
dvander@837
   269
 *
dvander@837
   270
 * @param string		Message to print.
dvander@837
   271
 * @noreturn
dvander@838
   272
 * @error				Always throws SP_ERROR_ABORT.
dvander@837
   273
 */
dvander@837
   274
native SetFailState(const String:string[]);
dvander@837
   275
dvander@837
   276
/**
dvander@560
   277
 * Aborts the current callback and throws an error.  This function
dvander@560
   278
 * does not return in that no code is executed following it.
dvander@560
   279
 *
dvander@560
   280
 * @param format		String format.
dvander@560
   281
 * @param ...			Format arguments.
dvander@560
   282
 * @noreturn
dvander@560
   283
 * @error				Always!
dvander@560
   284
 */
ds@634
   285
native ThrowError(const String:fmt[], any:...);
dvander@560
   286
dvander@536
   287
/**
dvander@1378
   288
 * Logs a plugin message to the SourceMod logs.  The log message will be 
dvander@1378
   289
 * prefixed by the plugin's logtag (filename).
dvander@429
   290
 *
ds@475
   291
 * @param format		String format.
ds@475
   292
 * @param ...			Format arguments.
dvander@429
   293
 * @noreturn
dvander@429
   294
 */
ds@634
   295
native LogMessage(const String:format[], any:...);
dvander@429
   296
dvander@429
   297
/**
dvander@1378
   298
 * Logs a message to the SourceMod logs without any plugin logtag.  This is 
dvander@1378
   299
 * useful for re-routing messages from other plugins, for example, messages 
dvander@1378
   300
 * from LogAction().
dvander@1378
   301
 *
dvander@1378
   302
 * @param format		String format.
dvander@1378
   303
 * @param ...			Format arguments.
dvander@1378
   304
 * @noreturn
dvander@1378
   305
 */
dvander@1378
   306
native LogMessageEx(const String:format[], any:...);
dvander@1378
   307
dvander@1378
   308
/**
dvander@1378
   309
 * Logs a message to any file.  The log message will be in the normal 
dvander@1378
   310
 * SourceMod format, with the plugin logtag prepended.
dvander@1378
   311
 *
dvander@1378
   312
 * @param file			File to write the log message in.
dvander@1378
   313
 * @param format		String format.
dvander@1378
   314
 * @param ...			Format arguments.
dvander@1378
   315
 * @noreturn
dvander@1378
   316
 * @error				File could not be opened/written.
dvander@1378
   317
 */
dvander@1378
   318
native LogToFile(const String:file[], const String:format[], any:...);
dvander@1378
   319
dvander@1378
   320
/**
dvander@1378
   321
 * Same as LogToFile(), except no plugin logtag is prepended.
dvander@1378
   322
 *
dvander@1378
   323
 * @param file			File to write the log message in.
dvander@1378
   324
 * @param format		String format.
dvander@1378
   325
 * @param ...			Format arguments.
dvander@1378
   326
 * @noreturn
dvander@1378
   327
 * @error				File could not be opened/written.
dvander@1378
   328
 */
dvander@1378
   329
native LogToFileEx(const String:file[], const String:format[], any:...);
dvander@1378
   330
dvander@1378
   331
/**
dvander@1378
   332
 * Logs an action from a command or event whereby interception and routing may 
dvander@1378
   333
 * be important.  This is intended to be a logging version of ShowActivity().
dvander@1378
   334
 *
dvander@1378
   335
 * @param client		Client performing the action, 0 for server, or -1 if not 
dvander@1378
   336
 *						applicable.
dvander@1378
   337
 * @param target		Client being targetted, or -1 if not applicable.
dvander@1378
   338
 * @param message		Message format.
dvander@1378
   339
 * @param ...			Message formatting parameters.
dvander@1378
   340
 * @noreturn
dvander@1378
   341
 */
dvander@1378
   342
native LogAction(client, target, const String:message[], any:...);
dvander@1378
   343
dvander@1378
   344
/**
dvander@429
   345
 * Logs a plugin error message to the SourceMod logs.
dvander@429
   346
 *
ds@475
   347
 * @param format		String format.
ds@475
   348
 * @param ...			Format arguments.
dvander@429
   349
 * @noreturn
dvander@429
   350
 */
ds@634
   351
native LogError(const String:format[], any:...);
dvander@460
   352
dvander@530
   353
/**
dvander@595
   354
 * Gets the system time as a unix timestamp.
dvander@595
   355
 *
dvander@595
   356
 * @param bigStamp		Optional array to store the 64bit timestamp in.
dvander@595
   357
 * @return				32bit timestamp (number of seconds since unix epoch).
dvander@595
   358
 */
dvander@595
   359
native GetTime(bigStamp[2]={0,0});
dvander@595
   360
dvander@595
   361
/**
dvander@1334
   362
 * Produces a date and/or time string value for a timestamp.
dvander@1334
   363
 *
dvander@1334
   364
 * See this URL for valid parameters: 
dvander@1334
   365
 * http://opengroup.org/onlinepubs/007908799/xsh/strftime.html
faluco@1037
   366
 *
faluco@1037
   367
 * @param buffer		Destination string buffer.
faluco@1037
   368
 * @param maxlength		Maximum length of output string buffer.
faluco@1359
   369
 * @param format		Formatting rules (passing NULL_STRING will use the rules defined in sm_datetime_format).
faluco@1041
   370
 * @param stamp			Optional time stamp.
faluco@1037
   371
 * @noreturn
dvander@1334
   372
 * @error			Buffer too small or invalid time format.
faluco@1037
   373
 */
faluco@1041
   374
native FormatTime(String:buffer[], maxlength, const String:format[], stamp=-1);
faluco@1037
   375
faluco@1037
   376
/**
faluco@703
   377
 * Loads a game config file.
faluco@703
   378
 *
faluco@703
   379
 * @param file			File to load.  The path must be relative to the 'gamedata' folder under the config folder 
faluco@703
   380
 *					and the extension should be omitted.
faluco@703
   381
 * @return			A handle to the game config file or INVALID_HANDLE in failure.
faluco@703
   382
 */
faluco@703
   383
native Handle:LoadGameConfigFile(const String:file[]);
faluco@703
   384
faluco@703
   385
/**
faluco@703
   386
 * Returns an offset value.
faluco@703
   387
 *
faluco@703
   388
 * @param gc			Game config handle.
faluco@703
   389
 * @param key			Key to retrieve from the offset section.
faluco@703
   390
 * @return			An offset, or -1 on failure.
faluco@703
   391
 */
faluco@703
   392
native GameConfGetOffset(Handle:gc, const String:key[]);
faluco@703
   393
faluco@703
   394
/**
faluco@703
   395
 * Gets the value of a key from the "Keys" section.
faluco@703
   396
 *
faluco@703
   397
 * @param gc			Game config handle.
faluco@703
   398
 * @param key			Key to retrieve from the Keys section.
faluco@703
   399
 * @param buffer		Destination string buffer.
faluco@703
   400
 * @param maxlen		Maximum length of output string buffer.
dvander@886
   401
 * @return				True if key existed, false otherwise.
faluco@703
   402
 */
faluco@703
   403
native bool:GameConfGetKeyValue(Handle:gc, const String:key[], String:buffer[], maxlen);
faluco@703
   404
dvander@886
   405
/**
dvander@886
   406
 * Returns the operating system's "tick count," which is a number of 
dvander@886
   407
 * milliseconds since the operating system loaded.  This can be used
dvander@886
   408
 * for basic benchmarks.
dvander@886
   409
 *
dvander@886
   410
 * @return				Tick count in milliseconds.
dvander@886
   411
 */
dvander@886
   412
native GetSysTickCount();
dvander@886
   413
dvander@978
   414
/**
dvander@978
   415
 * Specifies that the given config file should be executed after plugin load.
dvander@978
   416
 * OnConfigsExecuted() will not be called until the config file has executed, 
dvander@978
   417
 * but it will be called if the execution fails.
dvander@978
   418
 *
dvander@978
   419
 * @param autoCreate	If true, and the config file does not exist, such a config
dvander@978
   420
 *						file will be automatically created and populated with
dvander@978
   421
 *						information from the plugin's registered cvars.
dvander@978
   422
 * @param name			Name of the config file, excluding the .cfg extension.
dvander@978
   423
 *						If empty, <plugin.filename.cfg> is assumed.
dvander@978
   424
 * @param folder		Folder under cfg/ to use.  By default this is "sourcemod."
dvander@978
   425
 * @noreturn
dvander@978
   426
 */
dvander@978
   427
native AutoExecConfig(bool:autoCreate=true, const String:name[]="", const String:folder[]="sourcemod");
dvander@978
   428
faluco@1112
   429
/**
faluco@1112
   430
 * Sets a native as optional, such that if it is unloaded, removed,
faluco@1112
   431
 * or otherwise non-existent, the plugin will still work.  Calling
faluco@1112
   432
 * removed natives results in a run-time error.
faluco@1112
   433
 *
faluco@1112
   434
 * @param name			Native name.
faluco@1112
   435
 * @noreturn
faluco@1112
   436
 */
faluco@1112
   437
native MarkNativeAsOptional(const String:name[]);
faluco@1112
   438
faluco@1112
   439
/**
faluco@1112
   440
 * Registers a library name for identifying as a dependency to 
faluco@1112
   441
 * other plugins.
faluco@1112
   442
 *
faluco@1112
   443
 * @param name			Library name.
faluco@1112
   444
 * @noreturn
faluco@1112
   445
 */
faluco@1112
   446
native RegPluginLibrary(const String:name[]);
faluco@1112
   447
dvander@1124
   448
/**
dvander@1124
   449
 * Returns whether a library exists.
dvander@1124
   450
 *
dvander@1124
   451
 * @param name			Library name.
dvander@1124
   452
 * @return				True if exists, false otherwise.
dvander@1124
   453
 */
dvander@1124
   454
native bool:LibraryExists(const String:name[]);
dvander@1124
   455
dvander@1124
   456
/**
dvander@1419
   457
 * Returns the status of an extension, by filename.
dvander@1419
   458
 *
dvander@1419
   459
 * @param name			Extension name (like "sdktools.ext").
dvander@1419
   460
 * @param error			Optional error message buffer.
dvander@1419
   461
 * @param maxlength		Length of optional error message buffer.
dvander@1419
   462
 * @return				-2 if the extension was not found.
dvander@1419
   463
 *						-1 if the extension was found but failed to load.
dvander@1419
   464
 * 						 0 if the extension loaded but reported an error.
dvander@1419
   465
 * 						 1 if the extension is running without error.
dvander@1419
   466
 */
dvander@1419
   467
native GetExtensionFileStatus(const String:name[], String:error[]="", maxlength=0);
dvander@1419
   468
dvander@1419
   469
/**
dvander@1124
   470
 * Called after a library (plugin) is added that the 
dvander@1124
   471
 * current plugin references optionally.
dvander@1124
   472
 *
dvander@1124
   473
 * @param name			Library name.
dvander@1124
   474
 */
dvander@1124
   475
forward OnLibraryAdded(const String:name[]);
dvander@1124
   476
dvander@1124
   477
/**
dvander@1124
   478
 * Called right before a library (plugin) is removed that the 
dvander@1124
   479
 * current plugin references optionally.
dvander@1124
   480
 *
dvander@1124
   481
 * @param name			Library name.
dvander@1124
   482
 */
dvander@1124
   483
forward OnLibraryRemoved(const String:name[]);
dvander@1124
   484
dvander@460
   485
#include <helpers>
dvander@560
   486
#include <entity>
dvander@1419
   487