items: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
No edit summary
 
(46 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|1.00|= Game version
|version1= 1.00
|arg= global|= Arguments in MP
____________________________________________________________________________________________


| Returns an array of names of all special items of a vehicle or a soldier. |= Description
|game2= arma2oa
____________________________________________________________________________________________
|version2= 1.50


| [[items]] unit |= Syntax
|game3= tkoh
|version3= 1.00


|p1= unit: [[Object]]  |PARAMETER1=  
|game4= arma3
|version4= 0.50


| [[Array]] |RETURNVALUE=  
|arg= global


|gr1= Unit Inventory


|x1= <code>_itemsplayer <nowiki>=</nowiki> [[items]] [[player]]; </code>|EXAMPLE1=
|descr= Returns an array of names of all unit's stored items, including [[weapons]] but excluding [[magazines]] (see [[itemsWithMagazines]]) and [[assignedItems]].


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


____________________________________________________________________________________________
|p1= unit: [[Object]]


| [[assignedItems]], [[primaryWeaponItems]], [[secondaryWeaponItems]] |SEEALSO=
|r1= [[Array]]


| |MPBEHAVIOUR=  
|x1= <sqf>_itemsPlayer = items player;</sqf>
____________________________________________________________________________________________
}}


<h3 style='display:none'>Notes</h3>
|x2= <sqf>player sideChat format ["%1", items player];</sqf>
<dl class='command_description'>
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on June 18, 2013 - 14:20
|seealso= [[itemsWithMagazines]] [[assignedItems]] [[primaryWeaponItems]] [[secondaryWeaponItems]] [[backpacks]]
<dt class="note">'''[[User:Druid|Druid]]'''<dd class="note">Arma 3, version 0.70 - magazines, explosives, grenades and all items currently linked on the unit are not returned now.<br/>
}}


<!-- Note Section END -->
{{Note
</dl>
|user= comp_uter15776
 
|timestamp= 20220119160104
<h3 style='display:none'>Bottom Section</h3>
|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.
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
For weapons and launchers that aren't stored inside a uniform, backpack or vest use '''weaponsItems'''. For throwables use '''magazines'''.
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

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.