This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Bz eGetPlayerSpawnPosEvent: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Alezakos (talk | contribs)
m fix typo
Zehra (talk | contribs)
redirect, since events are in official docs
Tag: New redirect
 
Line 1: Line 1:
{{BZFS_API_Doc}}
#REDIRECT [[Category:BZFS API Docs]]
{{BZFS_API_Events}}
 
==Overview==
The '''bz_eGetPlayerSpawnPosEvent''' is an API event that is called each time the server needs a new spawn position.
 
==Data==
'''bz_eGetPlayerSpawnPosEvent''' returns the '''bz_GetPlayerSpawnPosEventData_V1''' data class.
 
  {| border="1" cellpadding="20" cellspacing="0"
  !name
  !type
  !value description
  |-
  |eventType   
  |[[Event(API)|bz_eEventType]]
  |bz_eGetPlayerSpawnPosEventData
  |-
  |playerID
  |int
  |ID of the player that is requesting the spawn position.
  |-
  |team
  |bz_eTeamType
  |The team the player is currently in.
  |-
  |handled
  |bool
  |The current state representing if other plug-ins have modified the spawn position. Plug-ins that modify the spawn position should set this value to true to inform other plug-ins that have not processed yet.
  |-
  |pos
  |float[3]
  |Position where the player will be spawned. This value is initialized to the server computed spawn position using the current spawn rules.
  |-
  |rot
  |float
  |The rotational direction that the player will be spawned at. This value is initialized to the server computed spawn rotation using the current spawn rules.
  |-
  |eventTime
  |double
  |The server time at which the event occurred (in seconds).
  |}
 
==Uses==
This is a modification event, plug-ins may change the pos and rot fields to effect changes in the spawn position that is used for the player.

Latest revision as of 22:37, 9 November 2025