addPlayerScores: Difference between revisions
| Lou Montana (talk | contribs) m (Text replacement - "\| *arma3 * * *\| *([0-2]\.[0-9]{2}) * " to "|game1= arma3 |version1= $1 ") | Lou Montana (talk | contribs)   (Add kill values) | ||
| (10 intermediate revisions by the same user not shown) | |||
| Line 11: | Line 11: | ||
| |descr= MP server only: Adds player score. | |descr= MP server only: Adds player score. | ||
| {{{!}} class="wikitable align-center" | |||
| ! Kill Type | |||
| {{!}} infantry	{{!}}{{!}} soft	{{!}}{{!}} armor	{{!}}{{!}} air	{{!}}{{!}} killed | |||
| {{!}}- | |||
| ! Score Points | |||
| {{!}} 1		{{!}}{{!}} 2	{{!}}{{!}} 3		{{!}}{{!}} 5	{{!}}{{!}} -1 | |||
| {{!}}} | |||
| |s1=  | |s1= unit [[addPlayerScores]] values | ||
| |p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
| |p2= values: [[Array]]  | |p2= values: [[Array]] of [[Number]]s format [killsInfantry , killsSoft, killsArmor, killsAir, killed] | ||
| |r1= [[Nothing]] | |r1= [[Nothing]] | ||
| |x1= < | |x1= <sqf>player addPlayerScores [0, 1, 0, 0, 1];</sqf> | ||
| |seealso= [[addScore]] | |seealso= [[addScore]] [[addScoreSide]] [[getPlayerScores]] [[score]] [[scoreSide]] | ||
| }} | }} | ||
| {{Note | |||
| |user= Beno 83au | |||
| |timestamp= 20170502014800 | |||
| |text= 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: | |||
| <sqf>player addPlayerScores [2, 0, 0, 0, 0];</sqf> | |||
| 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: | |||
| < | |||
| The 2 points will add 1 point to counter the negative friendly-fire point and 1 point to add correctly to the score. | The 2 points will add 1 point to counter the negative friendly-fire point and 1 point to add correctly to the score. | ||
| }} | |||
Latest revision as of 12:02, 26 February 2025
Description
- Description:
- MP server only: Adds player score.
Kill Type infantry soft armor air killed Score Points 1 2 3 5 -1 
- Groups:
- Object ManipulationMultiplayer
Syntax
- Syntax:
- unit addPlayerScores values
- Parameters:
- unit: Object
- values: Array of Numbers format [killsInfantry , killsSoft, killsArmor, killsAir, killed]
- Return Value:
- Nothing
Examples
- Example 1:
Additional Information
- See also:
- addScore addScoreSide getPlayerScores score scoreSide
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 02, 2017 - 01:48 (UTC)
- 
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:
The 2 points will add 1 point to counter the negative friendly-fire point and 1 point to add correctly to the score.
 
	