bz_RegisterCustomFlag()
Available since 2.4.0
Create a custom flag type with its behavior defined by a plug-in.
A few things to keep in mind:
- This function must be called inside a plug-in's
Init()
method and should be loaded at server startup so the custom flags can be used with+f
,-f
, and-sl
bzfs options. - The abbreviation of a custom flag may not conflict with an existing flag, whether built-in to bzfs or through another plug-in.
- Custom flags do not have any functionality. It is up to the plug-in to implement functionality based on events.
Usage
bool bz_RegisterCustomFlag(const char* abbr, const char* name, const char* helpString, bz_eShotType shotType, bz_eFlagQuality quality)
Parameters | ||
---|---|---|
const char* |
abbr
|
The desired flag abbreviation. Must be unique and be 1 or 2 characters |
const char* |
name
|
The desired flag name. Max length 32 characters |
const char* |
helpString
|
The desired help string. Max length 128 characters |
bz_eShotType |
shotType
|
The default shot type for the flag |
bz_eFlagQuality |
quality
|
The flag's quality (good/bad) |
Returns
bool - If the flag was registered successfully.
Other Flag Management Functions
This content is maintained on GitHub. We welcome any feedback and improvements!