BIS fnc weaponAddon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game name" to "|Game name=")
m (Change note to important template)
Line 1: Line 1:
{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 9: Line 8:


| Return addon from CfgPatches to which a given weapon class belongs to.
| Return addon from CfgPatches to which a given weapon class belongs to.
{{note|This function is quite performance heavy, use only when absolutely necessary!}}
{{Important | This function is quite performance heavy, use only when absolutely necessary!}} |DESCRIPTION=
|DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| Classname [[call]] [[BIS_fnc_weaponAddon]];
| classname [[call]] [[BIS_fnc_weaponAddon]] |SYNTAX=


|p1= Classname [[String]] - Weapon's classname |PARAMETER1=
|p1= classname [[String]] - Weapon's classname |PARAMETER1=


| [[String]] - Config name of the addon |= return
| [[String]] - Config name of the addon |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code>"arifle_MX_F" call BIS_fnc_weaponAddon;//Returns "A3_Weapons_F_Rifles_MX"</code> |EXAMPLE1=
|x1= <code>"arifle_MX_F" [[call]] [[BIS_fnc_weaponAddon]]; {{cc|returns "A3_Weapons_F_Rifles_MX"}}</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


||SEEALSO=
||SEEALSO=
}}
}}



Revision as of 16:26, 8 September 2019

Hover & click on the images for description

Description

Description:
Return addon from CfgPatches to which a given weapon class belongs to.
This function is quite performance heavy, use only when absolutely necessary!
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
classname call BIS_fnc_weaponAddon
Parameters:
classname String - Weapon's classname
Return Value:
String - Config name of the addon

Examples

Example 1:
"arifle_MX_F" call BIS_fnc_weaponAddon; // returns "A3_Weapons_F_Rifles_MX"

Additional Information

See also:
See also needed

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

Bottom Section