Skip to Content

bz_eAllowFlagGrab

This event is called each time a player attempts to grab a flag. By setting allow to false, the player will not be able to grab the flag.

Data Object Type

2.4.2 bz_AllowFlagGrabData_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 playerID

The ID of the player who is grabbing the flag

int flagID

The ID of the flag that is going to be grabbed

const char* flagType

The type of the flag about to be grabbed

bool allow

Whether or not to allow the flag grab

double eventTime

The server time at which the event occurred (in seconds).

Plug-in Usage

Here's a list of plug-ins part of the official distribution that makes 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_AllowFlagGrabData_V1* dataObject = (bz_AllowFlagGrabData_V1*)eventData;

// Data
// ---
// (int)          playerID - The ID of the player who is grabbing the flag
// (int)          flagID - The ID of the flag that is going to be grabbed
// (const char*)  flagType - The type of the flag about to be grabbed
// (bool)         allow - Whether or not to allow the flag grab
// (double)       eventTime - The server time at which the event occurred (in seconds).

Other Flags Events

Back to bzfs API Events

This content is maintained on GitHub. We welcome any feedback and improvements!

Give us Feedback Edit this Page