backpackSpaceFor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
 
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(64 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma2oa |= Game name
|game1= arma2oa
|version1= 1.50


|1.51|= Game version
|game2= tkoh
____________________________________________________________________________________________
|version2= 1.00


| Returns how much space is in backpack for given weapon or magazine |= Description
|game3= arma3
____________________________________________________________________________________________
|version3= 0.50


| result <nowiki>=</nowiki> backpack backpackSpaceFor weaponName|= Syntax
|gr1= Containers


|p1= backpack: [[Object]]|=
|descr= Returns how much space is in backpack for given weapon or magazine
|p2= weaponName: [[String]]|=


| [[Array]] |= Return value
|s1= backpack [[backpackSpaceFor]] weaponName
____________________________________________________________________________________________


|x1= <pre>[weapons, magazines] = (backpack player) backpackSpaceFor "m16";</pre> |=
|p1= backpack: [[Object]]
____________________________________________________________________________________________


| |= See also
|p2= weaponName: [[String]]


}}
|r1= [[Array]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>(backpackContainer player) backpackSpaceFor "m16"; // [weapons, magazines]</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpack]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]]
</dl>
}}
 
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:ArmA 2 OA: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]

Latest revision as of 10:21, 13 May 2022

Hover & click on the images for description

Description

Description:
Returns how much space is in backpack for given weapon or magazine
Groups:
Containers

Syntax

Syntax:
backpack backpackSpaceFor weaponName
Parameters:
backpack: Object
weaponName: String
Return Value:
Array

Examples

Example 1:
(backpackContainer player) backpackSpaceFor "m16"; // [weapons, magazines]

Additional Information

See also:
backpackContainer firstBackpack unitBackpack backpack backpackCargo getBackpackCargo backpackItems addBackpack addBackpackCargo addBackpackCargoGlobal removeBackpack clearBackpackCargo clearBackpackCargoGlobal clearAllItemsFromBackpack loadBackpack 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