score: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
No edit summary
 
(44 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.00


|1.00|= Game version
|game2= ofpe
____________________________________________________________________________________________
|version2= 1.00


| Returns the person's score in MP. |= Description
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| '''score''' unit |= Syntax
|game4= arma2
|version4= 1.00


|p1= unit: [[Object]] |= Parameter 1
|game5= arma2oa
|version5= 1.50


| [[Number]] |= Return value
|game6= tkoh
____________________________________________________________________________________________
|version6= 1.00
 
|x1= <code>_pScore = [[score]] [[player]];</code> |= Example 1
____________________________________________________________________________________________


| [[addScore]], [[addScoreSide]], [[scoreSide]] |= See also
|game7= arma3
|version7= 0.50


}}
|gr1= Multiplayer
 
|descr= Returns the person's score in MP.
 
|s1= [[score]] unit
 
|p1= unit: [[Object]]
 
|r1= [[Number]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>_pScore = score player;</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[addScore]] [[scoreSide]] [[addScoreSide]] [[getPlayerScores]]
</dl>
}}


<h3 style="display:none">Bottom Section</h3>
{{Note
[[Category:Scripting Commands|SCORE]]
|user= Aimgame
[[Category:Scripting Commands OFP 1.96|SCORE]]
|timestamp= 20240309101734
[[Category:Scripting Commands OFP 1.46|SCORE]]
|text= In MP '''score player''' returns only the score of player in faction he joined first (within one server session). <br/>
[[Category:Scripting Commands ArmA|SCORE]]
I.e. if he first logged for WEST faction and then relogged for another faction, '''score player''' will show his score when he was WEST, no matter what real score is in current faction.<br/>
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
In this regard it is better to use [[getPlayerScores]]:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<sqf>(getPlayerScores player) select (count (getPlayerScores player) - 1)</sqf>
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
or
[[Category:Command_Group:_Multiplayer|{{uc:{{PAGENAME}}}}]]
<sqf>(getPlayerScores player) select 5</sqf>
- it will always return the player's actual score in the current faction.
}}

Latest revision as of 11:17, 9 March 2024

Hover & click on the images for description

Description

Description:
Returns the person's score in MP.
Groups:
Multiplayer

Syntax

Syntax:
score unit
Parameters:
unit: Object
Return Value:
Number

Examples

Example 1:
_pScore = score player;

Additional Information

See also:
addScore scoreSide addScoreSide getPlayerScores

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
Aimgame - c
Posted on Mar 09, 2024 - 10:17 (UTC)
In MP score player returns only the score of player in faction he joined first (within one server session).
I.e. if he first logged for WEST faction and then relogged for another faction, score player will show his score when he was WEST, no matter what real score is in current faction.
In this regard it is better to use getPlayerScores: or - it will always return the player's actual score in the current faction.