GetPlayerScore: Difference between revisions

From Zandronum Wiki
m (Added SCORE_SPREAD and SCORE_RANK.)
(Move to Category: ACS functions (caps))
Tag: Source edit
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ACSWarning}}
{{ACSWarning}}


int '''GetPlayerScore''' (int ''player'', int ''type'') {{Devfeature|3.1|alpha}}
int '''GetPlayerScore''' (int ''player'', int ''type'')


==Usage==
== Usage ==
=== Parameters ===
* ''player'': The number of the player.
* ''type'': One of:
:*'''SCORE_FRAGS''' = 0
::How many frags this player has.
:*'''SCORE_POINTS''' = 1
::How many points this player has.
:*'''SCORE_WINS''' = 2
::How many wins this player has.
:*'''SCORE_DEATHS''' = 3
::How many times this player died.
:*'''SCORE_KILLS''' = 4
::The number of monsters this player has killed.
:*'''SCORE_ITEMS''' = 5
::The number of items this player has picked up.
:*'''SCORE_SECRETS''' = 6
::The number of secrets this player has found.
:*'''SCORE_SPREAD''' = 7
::The player's spread from the leading player or runner-up.
:*'''SCORE_RANK''' = 8
::The player's current rank.


Returns the score of the player indicated by the ''player'' parameter. The ''type'' can be one of the following:
=== Return value ===
Returns the score of the player indicated by the ''player'' parameter.


*'''SCORE_FRAGS''' = 0
== Examples ==
How many frags this player has.
{{noexamples}}
*'''SCORE_POINTS''' = 1
How many points this player has.
*'''SCORE_WINS''' = 2
How many wins this player has.
*'''SCORE_DEATHS''' = 3
How many times this player died.
*'''SCORE_KILLS''' = 4
The number of monsters this player has killed.
*'''SCORE_ITEMS''' = 5
The number of items this player has picked up.
*'''SCORE_SECRETS''' = 6
The number of secrets this player has found.
*'''SCORE_SPREAD''' = 7
The player's spread from the leading player or runner-up.
*'''SCORE_RANK''' = 8
The player's current rank.


[[category:ACS Functions]]
== See also ==
* [[SetPlayerScore]]
 
[[category:ACS functions]]

Latest revision as of 02:21, 3 July 2022

This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

int GetPlayerScore (int player, int type)

Usage

Parameters

  • player: The number of the player.
  • type: One of:
  • SCORE_FRAGS = 0
How many frags this player has.
  • SCORE_POINTS = 1
How many points this player has.
  • SCORE_WINS = 2
How many wins this player has.
  • SCORE_DEATHS = 3
How many times this player died.
  • SCORE_KILLS = 4
The number of monsters this player has killed.
  • SCORE_ITEMS = 5
The number of items this player has picked up.
  • SCORE_SECRETS = 6
The number of secrets this player has found.
  • SCORE_SPREAD = 7
The player's spread from the leading player or runner-up.
  • SCORE_RANK = 8
The player's current rank.

Return value

Returns the score of the player indicated by the player parameter.

Examples

This article lists no examples, please add one.

See also