unitAddons: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dt class="note">'''\[\[.*\]\]'''" to "<dt class="note">$1")
m (Fix username deletion mistake)
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''unitAddons''' className  |SYNTAX=
| [[unitAddons]] className  |SYNTAX=


|p1= className: [[String]] - class name of a unit/vehicle or object |PARAMETER1=  
|p1= className: [[String]] - class name of a unit/vehicle or object |PARAMETER1=  
Line 31: Line 31:
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on Mar 31, 2014 - 23:38
<dd class="notedate">Posted on Mar 31, 2014 - 23:38
<dt class="note">[[]]<dd class="note">
<dt class="note">[[User:ffur2007slx2_5|ffur2007slx2_5]]<dd class="note">
1. From A3 1.14
1. From A3 1.14
<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>
Line 40: Line 40:


<h3 style='display:none'>Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 19:29, 19 May 2020

Hover & click on the images for description

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. 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"

Bottom Section