getPlayerScores: Difference between revisions
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) (Add side changing issue note) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 1.56 | |version1= 1.56 | ||
Line 5: | Line 6: | ||
|gr1= Multiplayer | |gr1= Multiplayer | ||
|descr= | |descr= Returns the unit's table of scores (infantry kills, soft vehicle kills, armor kills, air kills, deaths, total score) '''in multiplayer''' or an empty array in singleplayer. | ||
{{Feature|important|This command does not work (returns empty array) if the unit's side has been changed (e.g <sqf inline>[player] joinSilent createGroup east</sqf>).}} | |||
|s1= [[getPlayerScores]] unitName | |s1= [[getPlayerScores]] unitName | ||
|p1= unitName: [[Object]] | |p1= unitName: [[Object]] | ||
|x1= < | |r1= [[Array]] of [[Number]]s - the score of the given player in format [infantry kills, soft vehicle kills, armor kills, air kills, deaths, total score] | ||
|x1= <sqf> | |||
getPlayerScores BIS_player1; // e.g [4, 0, 3, 1, 2, 16] | |||
// or in SP: [] | |||
</sqf> | |||
|seealso= [[score]] [[addScore]] [[scoreSide]] [[addScoreSide]] [[addPlayerScores]] | |||
}} | }} |
Latest revision as of 13:09, 26 February 2025
Description
- Description:
- Returns the unit's table of scores (infantry kills, soft vehicle kills, armor kills, air kills, deaths, total score) in multiplayer or an empty array in singleplayer.
- Groups:
- Multiplayer
Syntax
- Syntax:
- getPlayerScores unitName
- Parameters:
- unitName: Object
- Return Value:
- Array of Numbers - the score of the given player in format [infantry kills, soft vehicle kills, armor kills, air kills, deaths, total score]
Examples
- Example 1:
- CopygetPlayerScores BIS_player1; // e.g [4, 0, 3, 1, 2, 16] // or in SP: []
Additional Information
- See also:
- score addScore scoreSide addScoreSide addPlayerScores
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note