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

# assignAsCargo

*Command · Unit Control · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

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

## Description

Assign a unit as cargo of a vehicle. Used together with [orderGetIn](../commands/orderGetIn.md) to order a unit to get in as cargo into a specific vehicle. Before usage of this command a subordinate unit has not got the option to get into the cargo space of the vehicle.

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

## Syntax

```sqf
unitName assignAsCargo vehicleName
```

**Parameters:**

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

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

## Examples

### Example 1

```sqf
_soldier1 assignAsCargo _truck;
[_soldier1] orderGetIn true;
```

## See also

[assignAsDriver](../commands/assignAsDriver.md) · [assignAsGunner](../commands/assignAsGunner.md) · [assignAsCommander](../commands/assignAsCommander.md) · [assignAsTurret](../commands/assignAsTurret.md) · [assignAsCargoIndex](../commands/assignAsCargoIndex.md) · [moveInCargo](../commands/moveInCargo.md) · [moveInCommander](../commands/moveInCommander.md) · [moveInDriver](../commands/moveInDriver.md) · [moveInGunner](../commands/moveInGunner.md) · [moveInTurret](../commands/moveInTurret.md) · [assignedVehicleRole](../commands/assignedVehicleRole.md) · [assignedVehicle](../commands/assignedVehicle.md) · [unassignVehicle](../commands/unassignVehicle.md) · [leaveVehicle](../commands/leaveVehicle.md) · [fullCrew](../commands/fullCrew.md)

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