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

# setRank

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

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

## Description

Sets rank of given unit.

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

## Syntax

```sqf
unitName setRank rank
```

**Parameters:**

- `unitName`: [Object](../topics/Object.md)
- `rank`: [String](../topics/String.md) - one of:
  - `"PRIVATE"`
  - `"CORPORAL"`
  - `"SERGEANT"`
  - `"LIEUTENANT"`
  - `"CAPTAIN"`
  - `"MAJOR"`
  - `"COLONEL"`

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

## Examples

### Example 1

```sqf
player setRank "COLONEL";
```

## See also

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

## Community notes

**Wolfrug** — 2009-03-26

Changing a unit's rank using either [setUnitRank](../commands/setUnitRank.md) or [setRank](../commands/setRank.md) will also REPLACE their current rating dependent on their new rank (colonels have a rating of 7500 etc).
That is to say REPLACE, not add to: the unit's old rating will disappear with the rank change.

---

**Waffle SS.** — 2014-04-12

Behavior when used on players in multiplayer seems unpredictable. (Arma 3 1.00)

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