BIS fnc compatibleMagazines: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (page filled and note formatted) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | |game1= arma3 | ||
|1.95 | |version1= 1.95 | ||
<! | <!--|serverExec= server--> | ||
<! | <!--|arg= local--> | ||
| | <!--|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]] | |||
|p1= weapon: [[String]] - Classname of the weapon | |||
|p2= returnHidden: [[Boolean]] - (Optional, default [[false]]) [[True]] to also return magazines with scope 1 | |||
| | |r1= [[Array]] - Array of magazine classes | ||
| | |x1= <code>["arifle_mx_f"] [[call]] [[BIS_fnc_compatibleMagazines]];</code> | ||
| | |exec= call | ||
| | |seealso= [[currentMagazine]] [[currentWeapon]] | ||
}} | }} | ||
[[Category:Function Group: Inventory|{{uc:compatibleMagazines}}]] | [[Category:Function Group: Inventory|{{uc:compatibleMagazines}}]] | ||
[[Category:Functions|{{uc:compatibleMagazines}}]] | [[Category:Functions|{{uc:compatibleMagazines}}]] | ||
Line 52: | Line 38: | ||
<dd class="note"> | <dd class="note"> | ||
This function returns all magazines in lower case.<br> | This function returns all magazines in lower case.<br> | ||
Example: | |||
[[currentMagazine]] player // "30Rnd_762x39_AK12_Mag_F"<br> | <code> | ||
[[currentWeapon]] player call BIS_fnc_compatibleMagazines // ["30rnd_762x39_ak12_mag_f",....]<br> | [[currentMagazine]] [[player]] // "30Rnd_762x39_AK12_Mag_F"<br> | ||
[[currentWeapon]] [[player]] [[call]] [[BIS_fnc_compatibleMagazines]]; // ["30rnd_762x39_ak12_mag_f",....]<br> | |||
[[toLowerANSI]] currentMagazine player [[in]] (currentWeapon player call BIS_fnc_compatibleMagazines) // | [[currentMagazine]] [[player]] [[in]] ([[currentWeapon]] [[player]] [[call]] [[BIS_fnc_compatibleMagazines]]) // never works<br> | ||
[[toLowerANSI]] [[currentMagazine]] [[player]] [[in]] ([[currentWeapon]] [[player]] [[call]] [[BIS_fnc_compatibleMagazines]]) // works</code> | |||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 11:14, 2 September 2020
Description
- Description:
- Get all compatibile magazines for selected weapons. Function looks both for magazines listed in "magazines" array & compatibile magazineWells.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [weapon, returnHidden] call BIS_fnc_compatibleMagazines
- Parameters:
- weapon: String - Classname of the weapon
- 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
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
- Posted on September 1, 2020 - 18:59 (UTC)
- pierremgi
-
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