addPlayerScores: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Bot: Reverted to revision 99654 by beno_83au on 2017-05-02T01:48:17Z)
m (template:command argument fix)
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| MP server only: Adds player score. |= Description
| MP server only: Adds player score. |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| unit [[addPlayerScores]] values |= Syntax
| unit [[addPlayerScores]] values |SYNTAX=


|p1= unit: [[Object]] |= Parameter 1
|p1= unit: [[Object]] |= Parameter 1
|p2= values: [[Array]] - killsInfantry , killsSoft, killsArmor, killsAir, killed
|p2= values: [[Array]] - killsInfantry , killsSoft, killsArmor, killsAir, killed


| Nothing |= Return Value
| Nothing |RETURNVALUE=


____________________________________________________________________________________________
____________________________________________________________________________________________
Line 26: Line 26:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[addScore]], [[addScoreSide]], [[getPlayerScores]], [[score]], [[scoreSide]] |= See also
| [[addScore]], [[addScoreSide]], [[getPlayerScores]], [[score]], [[scoreSide]] |SEEALSO=


}}
}}

Revision as of 11:25, 7 April 2019

-wrong parameter ("A3") defined!-[[:Category:Introduced with A3 version 1.62|1.62]]
Hover & click on the images for description

Description

Description:
MP server only: Adds player score.
Groups:
Uncategorised

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

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

[[Category:Introduced with A3 version 1.62]][[ Category: A3: New Scripting Commands | ADDPLAYERSCORES]][[ Category: A3: Scripting Commands | ADDPLAYERSCORES]]

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.