items: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
No edit summary
 
(11 intermediate revisions by 2 users not shown)
Line 25: Line 25:
|r1= [[Array]]
|r1= [[Array]]


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


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


|seealso= [[itemsWithMagazines]], [[assignedItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]]
|seealso= [[itemsWithMagazines]] [[assignedItems]] [[primaryWeaponItems]] [[secondaryWeaponItems]] [[backpacks]]
}}
 
{{Note
|user= comp_uter15776
|timestamp= 20220119160104
|text= When using '''items''' on a player; any equipped primary/secondary weapon/launchers, as well as certain throwables i.e. chemlights, smokes, grenades etc. are ''not'' returned.
For weapons and launchers that aren't stored inside a uniform, backpack or vest use '''weaponsItems'''. For throwables use '''magazines'''.
}}
}}

Latest revision as of 23:43, 31 January 2023

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:
itemsWithMagazines assignedItems primaryWeaponItems secondaryWeaponItems backpacks

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
comp_uter15776 - c
Posted on Jan 19, 2022 - 16:01 (UTC)
When using items on a player; any equipped primary/secondary weapon/launchers, as well as certain throwables i.e. chemlights, smokes, grenades etc. are not returned. For weapons and launchers that aren't stored inside a uniform, backpack or vest use weaponsItems. For throwables use magazines.