native

is_plugin_loaded

Syntax

native is_plugin_loaded(const name[], bool:usefilename=false);

Description

Checks whether a plugin is loaded by the given registered name (such as "Admin Base"), or, optionally
the given filename ("admin.amxx").

Parameters

name Either the plugin name to lookup, or the plugin filename to lookup.
usefilename Set to true if you want to search for the plugin by the filename, false to search
by the plugin's registered name.

Return

Plugin ID of the matching plugin on a successful search, -1 on a failed search.

Note

Prior to 1.8, this function would only search for plugins registered names, not
the filename.

Note

The plugin registered name search is a case insensitive search, however, the plugin
filename search is case sensitive.