Skip to Content

bz_eGetPlayerSpawnPosEvent

This event is called each time the server needs a new spawn position.

Data Object Type

2.4.0 bz_GetPlayerSpawnPosEventData_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

ID of the player that is requesting the spawn position.

bz_eTeamType team

The team the player is currently in.

bool handled

The current state representing if other plug-ins have modified the spawn position.

float[3] pos

Position where the player will be spawned. This value is initialized to the server

float rot

The rotational direction that the player will be spawned at. This value is initialized

double eventTime

The local server time of the event.

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_GetPlayerSpawnPosEventData_V1* dataObject = (bz_GetPlayerSpawnPosEventData_V1*)eventData;

// Data
// ---
// (int)          playerID - ID of the player that is requesting the spawn position.
// (bz_eTeamType) team - The team the player is currently in.
// (bool)         handled - The current state representing if other plug-ins have modified the spawn position.
// (float[3])     pos - Position where the player will be spawned. This value is initialized to the server
// (float)        rot - The rotational direction that the player will be spawned at. This value is initialized
// (double)       eventTime - The local server time of the event.

Other Player Spawns Events

Back to bzfs API Events

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

Give us Feedback Edit this Page