plugins/include/sourcemod.inc
changeset 1798 f62bedffc279
parent 1772 e27ea26b2685
child 1800 1f02d51c5c1e
     1.1 --- a/plugins/include/sourcemod.inc	Sun Dec 16 23:45:03 2007 +0000
     1.2 +++ b/plugins/include/sourcemod.inc	Sun Dec 16 23:45:41 2007 +0000
     1.3 @@ -267,6 +267,18 @@
     1.4  native bool:GetPluginInfo(Handle:plugin, PluginInfo:info, String:buffer[], maxlength);
     1.5  
     1.6  /**
     1.7 + * Finds a plugin by its order in the list from the "plugins list" server 
     1.8 + * "sm" command.  You should not use this function to loop through all plugins, 
     1.9 + * use the iterator instead.  Looping through all plugins using this native 
    1.10 + * is O(n^2), whereas using the iterator is O(n).
    1.11 + *
    1.12 + * @param order_num		Number of the plugin as it appears in "sm plugins list".
    1.13 + * @return				Plugin Handle on success, INVALID_HANDLE if no plugin 
    1.14 + *						matches the given number.
    1.15 + */
    1.16 +native Handle:FindPluginByNumber(order_num);
    1.17 +
    1.18 +/**
    1.19   * Causes the plugin to enter a failed state.  An error will be thrown and
    1.20   * the plugin will be paused until it is unloaded or reloaded.
    1.21   *