ACE3/addons/common/functions/fnc_getWeaponMuzzles.sqf

29 lines
534 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
/*
* 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>
*
* Example:
* ["gun"] call ace_common_fnc_getWeaponMuzzles
*
2015-09-21 11:08:10 +00:00
* Public: Yes
*/
params [["_weapon", "", [""]]];
private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
{
if (_x == "this") then {
2016-05-10 20:14:01 +00:00
_muzzles set [_forEachIndex, configName (configFile >> "CfgWeapons" >> _weapon)];
};
} forEach _muzzles;
2015-01-17 17:26:51 +00:00
_muzzles