This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Cleanup: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Allejo (talk | contribs)
added some info on how the unloading part of a plugin works for 2.4
 
Zehra (talk | contribs)
redirect page, as we're merging content
Tag: New redirect
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
===Code Example===
#REDIRECT [[BZFS API Updates]]
  void SAMPLE_PLUGIN::Cleanup( void ) {
      Flush(); //This removes all events that were registered with Registered()
      bz_debugMessage(4,"SAMPLE_PLUGIN plugin unloaded");
      return 0;
  }
 
===Functions===
The [[Cleanup]] function is required for all plugins. This function replaces the [[bz_Unload]] function in plugins written for 2.4 or higher. In this function all debug messages, events, map objects, and slash commands are unregistered. Available functions for this are as follows:
* [[bz_debugMessage]]
* [[Flush]]
* [[bz_removeCustomSlashCommand]]
* [[bz_removeCustomMapObject]]
 
More information on this function can be found on the [[BZFS_API_2.4_Upgrade]] page.

Latest revision as of 01:07, 24 November 2025

Redirect to: