rank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Armed[ _]Assault(\|.*)]]" to "{{GameCategory|arma1|Scripting Commands}}")
(updated SeeAlso)
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


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


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


|arg= global |Multiplayer Arguments=
|game3= arma2oa
|version3= 1.50


|gr1= Unit Identity |GROUP1=
|game4= tkoh
____________________________________________________________________________________________
|version4= 1.00


| Returns the rank of the given unit. Rank can be one of the following:
|game5= arma3
* <tt>"PRIVATE"</tt>
|version5= 0.50
* <tt>"CORPORAL"</tt>
* <tt>"SERGEANT"</tt>
* <tt>"LIEUTENANT"</tt>
* <tt>"CAPTAIN"</tt>
* <tt>"MAJOR"</tt>
* <tt>"COLONEL"</tt> |DESCRIPTION=
____________________________________________________________________________________________


| '''rank''' unitName |SYNTAX=
|arg= global


|p1= unitName: [[Object]] |PARAMETER1=
|gr1= Unit Identity


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


|x1= <code>_rank = [[rank]] player;</code> |EXAMPLE1=
|s1= [[rank]] unit
____________________________________________________________________________________________


| [[rating]], [[addRating]], [[setUnitRank]], [[ArmA: Rating Values|Rating Values]] |SEEALSO=
|p1= unit: [[Object]]


}}
|r1= [[String]]


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


<!-- Note Section END -->
|seealso= [[rankId]] [[rating]] [[addRating]] [[setUnitRank]] [[ArmA: Rating Values|Rating Values]]
</dl>
}}
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|RANK]]
{{GameCategory|arma1|Scripting Commands}}
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

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