unitAddons: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
Lou Montana (talk | contribs) m (Text replacement - "<dd class="note">([^}]*)<code>([^<]*)<\/code>" to "<dd class="note">$1<sqf>$2</sqf>") |
||
Line 26: | Line 26: | ||
<dd class="note"> | <dd class="note"> | ||
1. From A3 1.14 | 1. From A3 1.14 | ||
< | <sqf>hint str ([player] call BIS_fnc_unitAddon) // same as unitAddons (typeOf player)</sqf> | ||
2. To return the addon that a weapon belongs to, use [[BIS_fnc_weaponAddon]] instead. E.g. | 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> | <code>((primaryWeapon player) call BIS_fnc_weaponAddon); //return: "A3_Weapons_F_Rifles_Khaybar"</code> | ||
</dl> | </dl> |
Revision as of 10:57, 13 May 2022
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:
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
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"