items: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "_{10,} " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2 |Game name=
| arma2
|1.00|Game version=
|1.00
|arg= global|Multiplayer Arguments=
|arg= global


|gr1= Unit Inventory |GROUP1=
|gr1= Unit Inventory


| Returns an array of names of all unit's stored items, including [[weapons]] but excluding [[magazines]] (see [[itemsWithMagazines]]) and [[assignedItems]]. |DESCRIPTION=
| Returns an array of names of all unit's stored items, including [[weapons]] but excluding [[magazines]] (see [[itemsWithMagazines]]) and [[assignedItems]].


| [[items]] unit |SYNTAX=
| [[items]] unit


|p1= unit: [[Object]] |PARAMETER1=
|p1= unit: [[Object]]


| [[Array]] |RETURNVALUE=
| [[Array]]




|x1= <code>_itemsPlayer <nowiki>=</nowiki> [[items]] [[player]]; </code>|EXAMPLE1=
|x1= <code>_itemsPlayer <nowiki>=</nowiki> [[items]] [[player]]; </code>


|x2= <code>[[player]] [[sideChat]] [[format]] ["%1", [[items]] [[player]]];</code>|EXAMPLE2=
|x2= <code>[[player]] [[sideChat]] [[format]] ["%1", [[items]] [[player]]];</code>




| [[itemsWithMagazines]], [[assignedItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]] |SEEALSO=
| [[itemsWithMagazines]], [[assignedItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]]


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  

Revision as of 01:00, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns an array of names of all unit's stored items, including weapons but excluding magazines (see itemsWithMagazines) and assignedItems.
Groups:
Unit Inventory

Syntax

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

Examples

Example 1:
_itemsPlayer = items player;
Example 2:
player sideChat format ["%1", items player];

Additional Information

See also:
itemsWithMagazinesassignedItemsprimaryWeaponItemssecondaryWeaponItems

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