addPlayerScores

From Bohemia Interactive Community
Jump to: navigation, search
Introduced with Arma 3 version 1.62
  This scripting command must be executed on the server to work properly in multiplayer

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.62

Description

Description:
MP server only: Adds player score.

Syntax

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

Examples

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

Additional Information

Multiplayer:
-
See also:
addScoreaddScoreSidegetPlayerScoresscorescoreSide

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Bottom Section

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's 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.