rank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(updated SeeAlso)
 
(50 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|RANK]]
{{RV|type=command
[[Category:Scripting Commands ArmA|RANK]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
{{Command|= Comments
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.00


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


| Return the rank of the given unit. |= Description
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| '''rank''' unit |= Syntax
|game4= tkoh
|version4= 1.00


|p1= unit: [[Object]] |= Parameter 1
|game5= arma3
|version5= 0.50


| [[String]] |= Return value
|arg= global
____________________________________________________________________________________________


| [[setUnitRank]] |= See also
|gr1= Unit Identity


}}
|descr= Returns the rank of the given unit. Rank can be one of the following:
* {{hl|"PRIVATE"}}
* {{hl|"CORPORAL"}}
* {{hl|"SERGEANT"}}
* {{hl|"LIEUTENANT"}}
* {{hl|"CAPTAIN"}}
* {{hl|"MAJOR"}}
* {{hl|"COLONEL"}}
 
|s1= [[rank]] unit
 
|p1= unit: [[Object]]


<h3 style="display:none">Notes</h3>
|r1= [[String]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>_rank = rank player;</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[rankId]] [[rating]] [[addRating]] [[setUnitRank]] [[ArmA: Rating Values|Rating Values]]
}}

Latest revision as of 10:46, 16 January 2023

Hover & click on the images for description

Description

Description:
Returns the rank of the given unit. Rank can be one of the following:
  • "PRIVATE"
  • "CORPORAL"
  • "SERGEANT"
  • "LIEUTENANT"
  • "CAPTAIN"
  • "MAJOR"
  • "COLONEL"
Groups:
Unit Identity

Syntax

Syntax:
rank unit
Parameters:
unit: Object
Return Value:
String

Examples

Example 1:
_rank = rank player;

Additional Information

See also:
rankId rating addRating setUnitRank Rating Values

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