bz_eAllowCTFCaptureEvent
This event is called each time a team flag is about to be captured. By setting allow
to false, the capture event will not occur.
Known Issues
- The
killTeam
boolean is broken in 2.4; this will be fixed in the 2.6 (see issue #184)
Data Object Type
2.4.0 bz_AllowCTFCaptureEventData_V1
Parameters
These are the values accessible in the bz_EventData
variable that's made available in the Event
method.
Data Type | Name | Description |
---|---|---|
int |
playerCapping
|
The ID of the player making the capture |
bz_eTeamType |
teamCapped
|
The team whose flag is being captured |
bz_eTeamType |
teamCapping
|
The team making the capture |
float[3] |
pos
|
The position of the player |
float |
rot
|
The direction the player is |
bool |
allow
|
Whether or not to allow the capture |
bool |
killTeam
|
Whether or not tanks on the losing team should explode |
double |
eventTime
|
The server time at which the event occurred (in seconds) |
Plug-in Usage
There are no plug-ins in the official distribution that make use of this event. Browse the Plug-in Releases forum for plug-ins which may make use of this event.
Plug-in Example
This block of code can be used to get started when implementing the Event()
function of your plug-in.
bz_AllowCTFCaptureEventData_V1* dataObject = (bz_AllowCTFCaptureEventData_V1*)eventData;
// Data
// ---
// (int) playerCapping - The ID of the player making the capture
// (bz_eTeamType) teamCapped - The team whose flag is being captured
// (bz_eTeamType) teamCapping - The team making the capture
// (float[3]) pos - The position of the player
// (float) rot - The direction the player is
// (bool) allow - Whether or not to allow the capture
// (bool) killTeam - Whether or not tanks on the losing team should explode
// (double) eventTime - The server time at which the event occurred (in seconds)
Other Capture The Flag Events
This content is maintained on GitHub. We welcome any feedback and improvements!