BIS fnc compatibleMagazines: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (page filled and note formatted)
m (Text replacement - " (\|[pr][0-9]+ *= *[^-]+) *- *A([a-z])" to " $1 - a$2")
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function
{{RV|type=function


|game1= arma3
|game1= arma3
|version1= 1.96


|version1= 1.95
|gr1= Weapons


<!--|serverExec= server-->
|descr= {{Feature|obsolete|
 
Use [[compatibleMagazines]] instead.|arma3|2.10}}
<!--|arg= local-->
Gets all compatible magazines for selected weapons. Function looks both for magazines listed in {{hl|magazines}} array and compatible {{hl|magazineWells}}.
 
<!--|eff= local-->
 
|descr= Get all compatibile magazines for selected weapons. Function looks both for magazines listed in "magazines" array & compatibile magazineWells.


|s1= [weapon, returnHidden] call [[BIS_fnc_compatibleMagazines]]
|s1= [weapon, returnHidden] call [[BIS_fnc_compatibleMagazines]]


|p1= weapon: [[String]] - Classname of the weapon
|p1= weapon: [[String]] - weapon's classname
 
|p2= returnHidden: [[Boolean]] - (Optional, default [[false]]) [[True]] to also return magazines with scope 1


|r1= [[Array]] - Array of magazine classes
|p2= returnHidden: [[Boolean]] - (Optional, default [[false]]) [[true]] to also return magazines with scope 1


|x1= <code>["arifle_mx_f"] [[call]] [[BIS_fnc_compatibleMagazines]];</code>
|r1= [[Array]] - array of magazine classes


|exec= call
|x1= <sqf>["arifle_mx_f"] call BIS_fnc_compatibleMagazines;</sqf>
 
|seealso= [[currentMagazine]] [[currentWeapon]]


|seealso= [[currentMagazine]] [[currentWeapon]] [[compatibleMagazines]]
}}
}}
[[Category:Function Group: Inventory|{{uc:compatibleMagazines}}]]
[[Category:Functions|{{uc:compatibleMagazines}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:compatibleMagazines}}]]


<!-- CONTINUE Notes -->
{{Note
<dl class="command_description">
|user= PierreMGI
<dd class="notedate">Posted on September 1, 2020 - 18:59 (UTC)</dd>
|timestamp= 20200901185900
<dt class="note">[[User:pierremgi|pierremgi]]</dt>
|text= This function returns all magazines in lower case.<br>
<dd class="note">
This function returns all magazines in lower case.<br>
Example:
Example:
<code>
<sqf>
[[currentMagazine]] [[player]] // "30Rnd_762x39_AK12_Mag_F"<br>
currentMagazine player; // "30Rnd_762x39_AK12_Mag_F"
[[currentWeapon]] [[player]] [[call]] [[BIS_fnc_compatibleMagazines]];   // ["30rnd_762x39_ak12_mag_f",....]<br>
currentWeapon player call BIS_fnc_compatibleMagazines; // ["30rnd_762x39_ak12_mag_f", ...]
[[currentMagazine]] [[player]] [[in]] ([[currentWeapon]] [[player]] [[call]] [[BIS_fnc_compatibleMagazines]]) // never works<br>
currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // never works
[[toLowerANSI]] [[currentMagazine]] [[player]] [[in]] ([[currentWeapon]] [[player]] [[call]] [[BIS_fnc_compatibleMagazines]]) // works</code>
toLowerANSI currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // works
</dd>
</sqf>
</dl>
}}
<!-- DISCONTINUE Notes -->

Latest revision as of 12:39, 8 November 2023

Hover & click on the images for description

Description

Description:
🕖
This information is obsolete as of Arma 3 v2.10. Reason: Use compatibleMagazines instead.
Gets all compatible magazines for selected weapons. Function looks both for magazines listed in magazines array and compatible magazineWells.
Execution:
call
Groups:
Weapons

Syntax

Syntax:
[weapon, returnHidden] call BIS_fnc_compatibleMagazines
Parameters:
weapon: String - weapon's classname
returnHidden: Boolean - (Optional, default false) true to also return magazines with scope 1
Return Value:
Array - array of magazine classes

Examples

Example 1:
["arifle_mx_f"] call BIS_fnc_compatibleMagazines;

Additional Information

See also:
currentMagazine currentWeapon compatibleMagazines

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
PierreMGI - c
Posted on Sep 01, 2020 - 18:59 (UTC)
This function returns all magazines in lower case.
Example:
currentMagazine player; // "30Rnd_762x39_AK12_Mag_F" currentWeapon player call BIS_fnc_compatibleMagazines; // ["30rnd_762x39_ak12_mag_f", ...] currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // never works toLowerANSI currentMagazine player in (currentWeapon player call BIS_fnc_compatibleMagazines); // works