backpackItems: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "<code>([^ ]*)\{\{cc\|([^ ]*)\}\}([^ ]*)<\/code>" to "<code>$1// $2$3</code>")
Line 14: Line 14:
|r1= [[Array]]
|r1= [[Array]]


|x1= <code>backpackItems player; {{cc|returns e.g ["hgun_P07_F", "Titan_AT"]}}</code>
|x1= <code>backpackItems player; // returns e.g ["hgun_P07_F", "Titan_AT"]</code>


|seealso= [[uniformItems]] [[vestItems]] [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[addBackpack]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[backpackSpaceFor]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]]
|seealso= [[uniformItems]] [[vestItems]] [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[addBackpack]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[backpackSpaceFor]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]]
}}
}}

Revision as of 11:22, 12 May 2022

Hover & click on the images for description

Description

Description:
Get array with all items (of any kind, even weapons) in backpack of the given unit.
Groups:
Containers

Syntax

Syntax:
backpackItems unit
Parameters:
unit: Object
Return Value:
Array

Examples

Example 1:
backpackItems player; // returns e.g ["hgun_P07_F", "Titan_AT"]

Additional Information

See also:
uniformItems vestItems backpackContainer firstBackpack unitBackpack backpack backpackCargo getBackpackCargo addBackpack addBackpackCargo addBackpackCargoGlobal removeBackpack clearBackpackCargo clearBackpackCargoGlobal clearAllItemsFromBackpack loadBackpack backpackSpaceFor canAddItemToBackpack addItemToBackpack removeItemFromBackpack everyBackpack

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note