Arma 3 Scripting

Command in Vehicle Inventory

getItemCargo

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns all items names and count from ammo box (or any general weapon holder container).

Syntax

getItemCargo box

Parameters:

Returns: Array with [classes, counts]

Examples

Example 1

getItemCargo cursorTarget;
/*
    returns e.g
    [
        ["5ItemA", "10ItemB"]
        [5, 10]
    ]
*/

See also

itemCargo · addItemCargo · addItemCargoGlobal · clearItemCargo · clearItemCargoGlobal