2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
* Get the muzzles of a weapon.
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: A weapon in cfgWeapons (String)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* All weapon muzzles (Array)
|
|
|
|
*/
|
2015-01-17 17:26:51 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
private ["_muzzles"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
PARAMS_1(_weapon);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
_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-11 16:42:31 +00:00
|
|
|
};
|
2015-01-17 17:26:51 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
_muzzles
|