unitAddons: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "\[\[Category:[cC]ommand[_ ][gG]roup:[_ ][^|]+\|\{*uc:{{PAGENAME}*]\]" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1= Mods and Addons | |gr1= Mods and Addons | ||
| Returns list with addons the unit belongs to. | | Returns list with addons the unit belongs to. | ||
| [[unitAddons]] className | | [[unitAddons]] className | ||
|p1= className: [[String]] - class name of a unit/vehicle or object | |p1= className: [[String]] - class name of a unit/vehicle or object | ||
| [[Array]] - addon names | | [[Array]] - addon names | ||
|x1= <code>[[hint]] [[str]] [[unitAddons]] [[typeOf]] [[player]]; //["A3_Characters_F_BLUFOR"]</code> | |x1= <code>[[hint]] [[str]] [[unitAddons]] [[typeOf]] [[player]]; //["A3_Characters_F_BLUFOR"]</code> | ||
| [[activateAddons]] | | [[activateAddons]] | ||
| | | | ||
}} | }} | ||
Revision as of 11:40, 18 January 2021
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
Notes
- 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"