rank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(updated SeeAlso)
 
(53 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


<h2 style="color:#000066">''' rank ''unit'''''</h2>
|game2= arma2
|version2= 1.00


|game3= arma2oa
|version3= 1.50


'''Operand types:'''
|game4= tkoh
|version4= 1.00


'''unit:''' [[Object]]
|game5= arma3
|version5= 0.50


'''Type of returned value:'''
|arg= global


[[String]]
|gr1= Unit Identity


'''Compatibility:'''
|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"}}


Version 2.92 required.
|s1= [[rank]] unit


'''Description:'''
|p1= unit: [[Object]]


Return the rank of the given unit.
|r1= [[String]]
 
|x1= <sqf>_rank = rank player;</sqf>
 
|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