---
name: "assignItem"
type: command
status: ok
groups: ["Unit Inventory"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/assignItem
revid: 369096
updated: 2024-09-03T10:25:27Z
---

# assignItem

*Command · Unit Inventory · Arma 3 v0.50*

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

## Description

Assigns existing item from inventory (uniform, vest, backpack) to a correct slot. If the slot is occupied by another item, it gets replaced. See also [linkItem](../commands/linkItem.md).

## Syntax

```sqf
unit assignItem item
```

**Parameters:**

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

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

## Examples

### Example 1

```sqf
bluforUnit addItem "NVGoggles";
bluforUnit assignItem "NVGoggles";
opforUnit addItem "NVGoggles_OPFOR";
opforUnit assignItem "NVGoggles_OPFOR";
independentUnit addItem "NVGoggles_INDEP";
independentUnit assignItem "NVGoggles_INDEP";
```

## See also

[unassignItem](../commands/unassignItem.md) · [addItem](../commands/addItem.md) · [removeItem](../commands/removeItem.md) · [linkItem](../commands/linkItem.md) · [unlinkItem](../commands/unlinkItem.md) · [assignedItems](../commands/assignedItems.md) · [removeAllAssignedItems](../commands/removeAllAssignedItems.md)

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