---
name: "rankId"
type: command
status: ok
groups: ["Unit Identity"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/rankId
revid: 319405
updated: 2022-05-13T09:24:01Z
---

# rankId

*Command · Unit Identity · Arma 3 v0.50 · introduced in Arma 2 v1.00*

Locality: arguments **global**

## Description

Return the rank of the given unit for comparison.

Value may be:
- **0** - Private
- **1** - Corporal
- **2** - Sergeant
- **3** - Lieutenant
- **4** - Captain
- **5** - Major
- **6** - Colonel

## Syntax

```sqf
rankId unit
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)

**Returns:** [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
_myIdRank = rankId player;
```

## See also

[rank](../commands/rank.md)

<sub>Source: [BI Community Wiki — rankId](https://community.bistudio.com/wiki/rankId) (revision 319405).</sub>
