backpackSpaceFor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(48 intermediate revisions by 3 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


| backpack [[backpackSpaceFor]] weaponName |SYNTAX=
|gr1= Containers


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


|p2= weaponName: [[String]] |Parameter2=
|s1= backpack [[backpackSpaceFor]] weaponName


| [[Array]] |RETURNVALUE=
|p1= backpack: [[Object]]
____________________________________________________________________________________________


|x1= <code>([[backpack]] [[player]]) [[backpackSpaceFor]] "m16"; {{cc|[weapons, magazines]}}</code> |Example1=
|p2= weaponName: [[String]]
____________________________________________________________________________________________


| [[backpackContainer]], [[firstBackpack]], [[unitBackpack]], [[backpack]], [[backpackCargo]], [[getBackpackCargo]], [[backpackItems]], [[addBackpack]], [[addBackpackCargo]], [[addBackpackCargoGlobal]], [[removeBackpack]], [[clearBackpackCargo]], [[clearBackpackCargoGlobal]], [[clearAllItemsFromBackpack]], [[loadBackpack]], [[canAddItemToBackpack]], [[addItemToBackpack]], [[removeItemFromBackpack]], [[everyBackpack]] |SEEALSO=
|r1= [[Array]]


|x1= <sqf>(backpackContainer player) backpackSpaceFor "m16"; // [weapons, magazines]</sqf>
|seealso= [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpack]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Containers|{{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