> > > >

set_module_filter | amxmodx | AMX X Documentation

Includes

    1. Stocks
    1. Natives
    2. Forwards
    1. Natives
    2. Stocks
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    2. Forwards
    1. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Stocks
    1. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    1. Stocks
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    1. Natives
    2. Stocks
    1. Natives
    1. Natives
    1. Natives
    2. Stocks
    1. Natives
    1. Stocks
    1. Natives
    1. Natives
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Stocks
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    2. Forwards
    3. Stocks
    1. Natives
    1. Natives
    2. Stocks
    1. Stocks

set_module_filter

Syntax
									native set_module_filter(const handler[]);
								
Variable Description
No arguments

Description
Sets a module/library filter, letting the plugin intercept and handle an automatic module requirement.

Note
This has to be used inside the plugin_native() forward, otherwise it
has no effect.

Note
This is useful for creating plugins that can dynamically decide which
modules or features to use at runtime, often necessary for cross-mod
plugins. It allows to deploy a single version of the plugin instead
of compiling multiple versions for each use-case.

Note
For a list of possible libtypes see the LibType enum in amxconst.inc

Note
The handler will be called in the following manner:

public module_filter(const library[], LibType:type)

  library     - Shortname of library or class that is required
  libtrype    - Type of requirement being checked (library/module or class)

Note
The handler should return PLUGIN_CONTINUE to let the error through the
filter (which will result in the plugin failing to load), or
PLUGIN_HANDLED to imply that load can continue without the module.

Note
Errors occuring inside the handler will not be filtered and cause the
plugin to fail load as if the handler returned PLUGIN_CONTINUE.

Return
0 on success, -1 if filtering is not available, -2 if handler could not be found.
> > > >