---
name: "setUnitRank"
type: command
status: ok
groups: ["Unit Identity"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/setUnitRank
revid: 340312
updated: 2023-04-29T17:03:09Z
---

# setUnitRank

*Command · Unit Identity · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

Locality: arguments **global** · effect **global**

## Description

Sets rank of given unit.

Possible rank values, and the associated [rating](../commands/rating.md) that is **set** (not added, the value replaces previous rating) with it:

| Ranks | PRIVATE | CORPORAL | SERGEANT | LIEUTENANT | CAPTAIN | MAJOR | COLONEL |  |
|---|---|---|---|---|---|---|---|---|
| Ratings | ArmA<br>Arma 2<br>Arma 2:OA<br>Take On Helicopters | 0 | 500 | 1500 | 2500 | 3500 | 5000 | 7500 |
| Arma 3 (ca 2015) | 0 | 50 | 150 | 250 | 350 | 500 | 750 |  |
| Arma 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |

> [!NOTE]
> **Arma 3:** Before Arma 3 v1.68 and in previous titles, this command was Global Argument Local Effect.

## Syntax

```sqf
unitName setUnitRank rank
```

**Parameters:**

- `unitName`: [Object](../topics/Object.md)
- `rank`: [String](../topics/String.md) - see above. If a wrong string is provided, the command errors and reverts to using "PRIVATE"

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

## Examples

### Example 1

```sqf
player setUnitRank "COLONEL";
```

## See also

ArmA: Armed Assault: Rating Values · [rating](../commands/rating.md) · [addRating](../commands/addRating.md) · [rank](../commands/rank.md) · [setRank](../commands/setRank.md)

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