---
name: "canVehicleCargo"
type: command
status: ok
groups: ["Vehicle in Vehicle Transport"]
arma3_since: "1.62"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/canVehicleCargo
revid: 336373
updated: 2022-12-30T13:44:50Z
---

# canVehicleCargo

*Command · Vehicle in Vehicle Transport · Arma 3 v1.62*

## Description

Returns bool array if it is possible to load cargo inside vehicle and if possible to load cargo into empty vehicle

## Syntax

```sqf
vehicle canVehicleCargo cargo
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md) - vehicle carrying cargo
- `cargo`: [Object](../topics/Object.md) - cargo to put in vehicle

**Returns:** [Array](../topics/Array.md) of [Boolean](../topics/Boolean.md)s - [willFitIntoCurrentVehicle, willFitIntoEmptyVehicle]

## Examples

### Example 1

Blackfish with no vehicle cargo loaded

```sqf
private _result = blackfish canVehicleCargo offroad; // [true, true]
```

### Example 2

Blackfish with one vehicle cargo called offroad already loaded

```sqf
private _result = blackfish canVehicleCargo offroad; // [false, false]
```

Even if the Blackfish were empty, the offroad could not be loaded because it is already in a cargo space

### Example 3

Blackfish with one vehicle cargo called offroad already loaded

```sqf
private _result = blackfish canVehicleCargo offroad2; // [false, true]
```

offroad2 can't be loaded because there isn't enough space in the Blackfish, but if there were space offroad2 could be loaded into the Blackfish

## See also

[setVehicleCargo](../commands/setVehicleCargo.md) · [enableVehicleCargo](../commands/enableVehicleCargo.md) · [getVehicleCargo](../commands/getVehicleCargo.md) · [isVehicleCargo](../commands/isVehicleCargo.md) · [vehicleCargoEnabled](../commands/vehicleCargoEnabled.md) · [canSlingLoad](../commands/canSlingLoad.md) · Arma 3: Vehicle in Vehicle Transport

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