addPlayerScores: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dl class="command_description"> <dt></dt>" to "<dl class="command_description"> <dt></dt>")
m (Text replacement - " \| *([^=\| ]+) * \|p1=" to " |s1= $1 |p1=")
Line 13: Line 13:
| MP server only: Adds player score.
| MP server only: Adds player score.


| unit [[addPlayerScores]] values
|s1=  unit [[addPlayerScores]] values


|p1= unit: [[Object]]
|p1= unit: [[Object]]

Revision as of 23:46, 12 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Object ManipulationMultiplayer

Syntax

Syntax:
unit addPlayerScores values
Parameters:
unit: Object
values: Array - killsInfantry , killsSoft, killsArmor, killsAir, killed
Return Value:
Return value needed

Examples

Example 1:
player addPlayerScores [0, 1, 0, 0, 1];

Additional Information

See also:
addScoreaddScoreSidegetPlayerScoresscorescoreSide

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
Posted on May 2, 2017 - 01:48 (UTC)
Beno 83au
As this command will add the given number to a player's score, a little bit of thought needs to be given to friendly-fire if it is for something like a deathmatch or a FFA, due to friendly-fire incurring negative points. So to counter this just add 2 points every time a player kills a unit from the same side: player addPlayerScores [2, 0, 0, 0, 0]; The 2 points will add 1 point to counter the negative friendly-fire point and 1 point to add correctly to the score.