Arma 3 Scripting

Function in Inventory

BIS_fnc_limitAmmunition

Also available as Markdown and JSON, or read the original wiki page.

Description

Limits the number of magazines carried by individual unit. Each container (uniform, vest and backpack) can be limited separately or left untouched. The function limits the number of magazines of each unique ammo category in respective container. Items like First Aid Kit or Mine Detector are not affected by the function

Set the minimum and maximum values in an array, for example [0.5,1] will set the magazine count anywhere between 50-100% of default count.

Syntax

[unit,uniformMags,vestMags,BackpackMags] call BIS_fnc_limitAmmunition

Parameters:

Returns: Boolean

Examples

Example 1

player call BIS_fnc_limitAmmunition;

Example 2

[player,[],[0.5,0.5],[0,1]] call BIS_fnc_limitAmmunition;

See also

BIS_fnc_limitWeaponItems · BIS_fnc_limitItems