rank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Unified source layout.)
(updated SeeAlso)
 
(42 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


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


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


|arg= global |= Arguments in MP
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| Return the rank of the given unit. <br>
|game4= tkoh
Rank can be one of the following:
|version4= 1.00
*"PRIVATE"
*"CORPORAL"
*"SERGEANT"
*"LIEUTENANT"
*"CAPTAIN"
*"MAJOR"
*"COLONEL" |= Description
____________________________________________________________________________________________


| [[String]] <nowiki>=</nowiki> '''rank''' unitName |= Syntax
|game5= arma3
|version5= 0.50


|p1= unitName: [[Object]] |= Parameter 1
|arg= global


| [[String]] |= Return value
|gr1= Unit Identity
____________________________________________________________________________________________


|x1= <pre>_rank=Rank _TankOne</pre>
|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"}}


| [[setUnitRank]] |= See also
|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]]
 
}}
[[Category:Scripting Commands|RANK]]
[[Category:Scripting Commands ArmA|RANK]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands VBS2|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]

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