unitAddons: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 32: | Line 32: | ||
<dd class="notedate">Posted on Mar 31, 2014 - 23:38 | <dd class="notedate">Posted on Mar 31, 2014 - 23:38 | ||
<dt class="note">'''[[User:ffur2007slx2_5|ffur2007slx2_5]]'''<dd class="note"> | <dt class="note">'''[[User:ffur2007slx2_5|ffur2007slx2_5]]'''<dd class="note"> | ||
In ArmA3 ver 1.14 Old BIS function [[BIS_fnc_unitAddon]] has been deprecated, please always use [[unitAddons]] instead. | 1. In ArmA3 ver 1.14 Old BIS function [[BIS_fnc_unitAddon]] has been deprecated, please always use [[unitAddons]] instead. | ||
<code>hint str ([player] call BIS_fnc_unitAddon) // same as unitAddons (typeof player)</code> | <code>hint str ([player] call BIS_fnc_unitAddon) // same as unitAddons (typeof player)</code> | ||
2. To return the addon that a weapon belongs to, use [[bis_fnc_weaponaddon]] instead. E.g. | |||
<code> | |||
((primaryWeapon player) call bis_fnc_weaponaddon) //return: "A3_Weapons_F_Rifles_Khaybar" | |||
</code> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 13:21, 2 April 2014
Description
- Description:
- Returns list with addons the unit belongs to.
- Groups:
- Uncategorised
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. In ArmA3 ver 1.14 Old BIS function BIS_fnc_unitAddon has been deprecated, please always use unitAddons instead.
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"