rank: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
(updated SeeAlso)
 
(14 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">Bottom Section</h3>
|x1= <sqf>_rank = rank player;</sqf>


[[Category:Scripting Commands|RANK]]
|seealso= [[rankId]] [[rating]] [[addRating]] [[setUnitRank]] [[ArmA: Rating Values|Rating Values]]
{{GameCategory|arma1|Scripting Commands}}
}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

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