rank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
(updated SeeAlso)
 
(56 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|RANK]]
{{RV|type=command
[[Category:Scripting Commands ArmA|RANK]]


|game1= arma1
|version1= 1.00


|game2= arma2
|version2= 1.00


<h2 style="color:#000066">''''' rank''''' ''unit''</h2>
|game3= arma2oa
|version3= 1.50


|game4= tkoh
|version4= 1.00


'''Operand types:'''
|game5= arma3
|version5= 0.50


unit: [[Object]]
|arg= global


'''Type of returned value:'''
|gr1= Unit Identity


[[String]]
|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"}}


'''Compatibility:'''
|s1= [[rank]] unit


Version 2.92 required.
|p1= unit: [[Object]]


'''Description:'''
|r1= [[String]]


Return the rank of the given unit.
|x1= <sqf>_rank = rank player;</sqf>


'''Example:'''
|seealso= [[rankId]] [[rating]] [[addRating]] [[setUnitRank]] [[ArmA: Rating Values|Rating Values]]
}}

Latest revision as of 11: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