This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Bz ePlayerScoreChanged"

From BZFlagWiki
Jump to: navigation, search
(Created Documentation for this API Event.)
 
(time to eventTime)
 
Line 33: Line 33:
 
   |The old amount of '''element''' score the '''playerID''' had.
 
   |The old amount of '''element''' score the '''playerID''' had.
 
   |-
 
   |-
   |time
+
   |eventTime
 
   |double
 
   |double
   |Time local server time for the event.
+
   |The server time at which the event occurred (in seconds).
 
   |}
 
   |}
  
 
==Uses==
 
==Uses==
 
Can be used to record and report scores. Note that the difference between thisValue and lastValue can vary by more than 1 if a user for example, [[Team Kill|teamkills]] or kills with a Genocide shot.
 
Can be used to record and report scores. Note that the difference between thisValue and lastValue can vary by more than 1 if a user for example, [[Team Kill|teamkills]] or kills with a Genocide shot.

Latest revision as of 07:55, 1 May 2014

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.

BZFS Event. This page documents a BZFS event that is called by the game server to notify plug-ins of various actions and state changes in the game world.


Overview[edit]

The bz_ePlayerScoreChanged is an API event that is called when a player's score changes.

Data[edit]

bz_ePlayerScoreChanged returns the bz_PlayerScoreChangeEventData_V1 data class.

name type value description
eventType bz_eEventType bz_ePlayerScoreChanged
playerID int Player that has had a change of score.
element bz_eScoreElement The type of score that is being changed.
thisValue int The new amount of element score the playerID has.
lastValue int The old amount of element score the playerID had.
eventTime double The server time at which the event occurred (in seconds).

Uses[edit]

Can be used to record and report scores. Note that the difference between thisValue and lastValue can vary by more than 1 if a user for example, teamkills or kills with a Genocide shot.