BIS fnc weaponAddon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(string)
m (Text replacement - "<code> *([^<|{]*) *<\/code>" to "<sqf>$1</sqf>")
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Weapons


|1.00|= Game version
|descr= Return addon from CfgPatches to which a given weapon class belongs to.
____________________________________________________________________________________________
{{Feature | important | This function is quite performance heavy, use only when absolutely necessary!}}


| <pre>/*
|s1= classname call [[BIS_fnc_weaponAddon]]


Description:
|p1= classname [[String]] - weapon's classname
Return addon from CghPatches to which a given weapon class belongs to
Parameter(s):
0: STRING
Returns:
STRING - addon class
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|r1= [[String]] - addon's config name
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_weaponAddon]]; --> |= Syntax
|x1= <sqf>"arifle_MX_F" call BIS_fnc_weaponAddon; // returns "A3_Weapons_F_Rifles_MX"</sqf>
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso=
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Configs|{{uc:weaponAddon}}]]
[[Category:Functions|{{uc:weaponAddon}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:weaponAddon}}]]

Latest revision as of 22:45, 12 July 2022

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 - addon's config name

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