2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Get the muzzles of a weapon.
|
|
|
|
*
|
2015-09-21 11:08:10 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Weapon <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* All weapon muzzles <ARRAY>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* ["gun"] call ace_common_fnc_getWeaponMuzzles
|
|
|
|
*
|
2015-09-21 11:08:10 +00:00
|
|
|
* Public: Yes
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
params [["_weapon", "", [""]]];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
{
|
|
|
|
if (_x == "this") then {
|
2016-05-10 20:14:01 +00:00
|
|
|
_muzzles set [_forEachIndex, configName (configFile >> "CfgWeapons" >> _weapon)];
|
2015-12-12 15:48:54 +00:00
|
|
|
};
|
|
|
|
} forEach _muzzles;
|
2015-01-17 17:26:51 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
_muzzles
|