ACE3/addons/common/functions/fnc_getWeaponMuzzles.sqf

25 lines
407 B
Plaintext
Raw Normal View History

/*
* 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-09-21 11:08:10 +00:00
* Public: Yes
*/
2015-01-17 17:26:51 +00:00
#include "script_component.hpp"
2015-09-21 11:08:10 +00:00
params ["_weapon"];
2015-09-21 11:08:10 +00:00
private "_muzzles";
_muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles");
if ("this" in _muzzles) then {
2015-01-17 17:26:51 +00:00
_muzzles set [_muzzles find "this", _weapon];
};
2015-01-17 17:26:51 +00:00
_muzzles