Skip to Content

bz_eAllowPollEvent

This event is called before a poll begins.

Data Object Type

2.4.10 bz_AllowPollEventData_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 player ID attempting to start a poll

bz_ApiString pollAction

The poll action that's occurring; e.g. kick, kill, ban, set, or a custom poll type

bz_ApiString pollTarget

The target of the poll; e.g. a player's callsign or a BZDB variable + value

bool allow

Setting to this false will disallow a poll from starting

bz_ApiString reason

The message sent to the player as to why a poll was disallowed

double eventTime

The time of the event.

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_AllowPollEventData_V1* dataObject = (bz_AllowPollEventData_V1*)eventData;

// Data
// ---
// (int)          playerID - The player ID attempting to start a poll
// (bz_ApiString) pollAction - The poll action that's occurring; e.g. kick, kill, ban, set, or a custom poll type
// (bz_ApiString) pollTarget - The target of the poll; e.g. a player's callsign or a BZDB variable + value
// (bool)         allow - Setting to this false will disallow a poll from starting
// (bz_ApiString) reason - The message sent to the player as to why a poll was disallowed
// (double)       eventTime - The time of the event.

Other Polls Events

Back to bzfs API Events

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

Give us Feedback Edit this Page