unitAddons

From Bohemia Interactive Community
Revision as of 18:26, 9 June 2021 by Lou Montana (talk | contribs) (Text replacement - "\{\{RV\|type=command \| arma3 \| *([0-9]\.[0-9]{2}) * \|gr1=(.*) \|(.*) \|(.*) \|p1=(.*) \|(.*) \|x1=(.*) \|seealso=(.*) \}\} " to "{{RV|type=command |game1= arma3 |version1= $1 |gr1=$2 |descr=$3 |s1=$4 |p1=$5 |r1=$6...)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Returns list with addons the unit belongs to.
Groups:
Mods and Addons

Syntax

Syntax:
unitAddons className
Parameters:
className: String - class name of a unit/vehicle or object
Return Value:
Array - addon names

Examples

Example 1:
hint str unitAddons typeOf player; //["A3_Characters_F_BLUFOR"]

Additional Information

See also:
activateAddons

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
Posted on Mar 31, 2014 - 23:38
ffur2007slx2_5
1. From A3 1.14 hint str ([player] call BIS_fnc_unitAddon) // same as unitAddons (typeOf player) 2. To return the addon that a weapon belongs to, use BIS_fnc_weaponAddon instead. E.g. ((primaryWeapon player) call BIS_fnc_weaponAddon); //return: "A3_Weapons_F_Rifles_Khaybar"