This wiki is archived and useful information is being migrated to the main bzflag.org website

bz_unloadPlugin

From BZFlagWiki
Revision as of 10:25, 19 October 2011 by Sigonasr2 (Talk | contribs) (Create API Function Page. Include Example.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

bool bz_unloadPlugin (const char* path)


Unloads a plugin that is currently loaded.

Parameters:
path  -  The exact path of the plugin file. In addition, it may be locally referenced starting from the path returned by bz_pluginBinPath().
Returns:
Whether or not the plugin unloaded successfully.


Example

Load the FlagOnSpawn plugin which then gets unloaded the moment a player joins.

case bz_eWorldFinalized: {
	bz_loadPlugin("/home/name/path/to/flagOnSpawn.so","WG:-1");
}break;
case bz_ePlayerJoinEvent: {
	bz_unloadPlugin("/home/name/path/to/flagOnSpawn.so");
}break;