BIS fnc weaponAddon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|Multiplayer Effects(...)
Line 1: Line 1:
{{Function|Comments=
{{Function| arma3|1.00|gr1 = Weapons| Return addon from CfgPatches to which a given weapon class belongs to.
 
{{Important | This function is quite performance heavy, use only when absolutely necessary!}}| classname [[call]] [[BIS_fnc_weaponAddon]]|p1= classname [[String]] - Weapon's classname| [[String]] - Config name of the addon|x1= <code>"arifle_MX_F" [[call]] [[BIS_fnc_weaponAddon]]; {{cc|returns "A3_Weapons_F_Rifles_MX"}}</code>||SEEALSO=
| arma3 |Game name=
 
|1.00|Game version=
 
|gr1 = Weapons |GROUP1=
 
| Return addon from CfgPatches to which a given weapon class belongs to.
{{Important | This function is quite performance heavy, use only when absolutely necessary!}} |DESCRIPTION=
 
| classname [[call]] [[BIS_fnc_weaponAddon]] |SYNTAX=
 
|p1= classname [[String]] - Weapon's classname |PARAMETER1=
 
| [[String]] - Config name of the addon |RETURNVALUE=
 
|x1= <code>"arifle_MX_F" [[call]] [[BIS_fnc_weaponAddon]]; {{cc|returns "A3_Weapons_F_Rifles_MX"}}</code> |EXAMPLE1=
 
||SEEALSO=
}}
}}



Revision as of 10:57, 18 January 2021

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:
Weapons

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