---
name: "assignAsCargoIndex"
type: command
status: ok
groups: ["Unit Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/assignAsCargoIndex
revid: 330322
updated: 2022-08-31T15:06:34Z
---

# assignAsCargoIndex

*Command · Unit Control · Arma 3 v0.50 · introduced in Take On Helicopters v1.01*

## Description

Assigns the character to a specific cargo / passenger index of the given vehicle.

> [!NOTE]
> See AI Group Vehicle Management for more information.

## Syntax

```sqf
character assignAsCargoIndex [vehicle, index]
```

**Parameters:**

- `character`: [Object](../topics/Object.md) - character to assign
- `vehicle`: [Object](../topics/Object.md) - vehicle to assign to
- `index`: [Number](../topics/Number.md) - cargo / passenger index

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

## Examples

### Example 1

```sqf
player assignAsCargoIndex [myHelicopter, 1];
```

## See also

[assignAsCargo](../commands/assignAsCargo.md) · [assignAsDriver](../commands/assignAsDriver.md) · [assignAsCommander](../commands/assignAsCommander.md) · [assignAsGunner](../commands/assignAsGunner.md) · [assignAsTurret](../commands/assignAsTurret.md) · [getCargoIndex](../commands/getCargoIndex.md) · [assignedVehicleRole](../commands/assignedVehicleRole.md) · [unassignVehicle](../commands/unassignVehicle.md) · [fullCrew](../commands/fullCrew.md)

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