---
name: "getWeaponCargo"
type: command
status: ok
groups: ["Vehicle Inventory", "Containers"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getWeaponCargo
revid: 319293
updated: 2022-05-13T09:23:30Z
---

# getWeaponCargo

*Command · Vehicle Inventory, Containers · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.54*

Locality: arguments **global**

## Description

Returns all weapons types and count from the cargo space

## Syntax

```sqf
getWeaponCargo object
```

**Parameters:**

- `object`: [Object](../topics/Object.md) - object to check

**Returns:** [Array](../topics/Array.md) - format [all_types_array, all_counts_array]. Eg: [["a", "b"], [3, 2]]

## Examples

### Example 1

```sqf
_content = getWeaponCargo carName;
```

### Example 2

```sqf
_content = getWeaponCargo ammoBoxName;
```

## See also

[weaponCargo](../commands/weaponCargo.md) · [addWeaponCargo](../commands/addWeaponCargo.md) · [addWeaponCargoGlobal](../commands/addWeaponCargoGlobal.md) · [clearWeaponCargo](../commands/clearWeaponCargo.md) · [clearWeaponCargoGlobal](../commands/clearWeaponCargoGlobal.md)

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