backpackSpaceFor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
 
(5 intermediate revisions by 2 users not shown)
Line 22: Line 22:
|r1= [[Array]]
|r1= [[Array]]


|x1= <code>([[backpack]] [[player]]) [[backpackSpaceFor]] "m16"; {{cc|[weapons, magazines]}}</code>
|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]]
|seealso= [[backpackContainer]] [[firstBackpack]] [[unitBackpack]] [[backpack]] [[backpackCargo]] [[getBackpackCargo]] [[backpackItems]] [[addBackpack]] [[addBackpackCargo]] [[addBackpackCargoGlobal]] [[removeBackpack]] [[clearBackpackCargo]] [[clearBackpackCargoGlobal]] [[clearAllItemsFromBackpack]] [[loadBackpack]] [[canAddItemToBackpack]] [[addItemToBackpack]] [[removeItemFromBackpack]] [[everyBackpack]]
}}
}}

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