2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Gets the optic classnames of all currently equipped weapons.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-02-10 04:22:10 +00:00
|
|
|
* 0: Unit <OBJECT>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-02-10 04:22:10 +00:00
|
|
|
* 0: Optic of primary <STRING>
|
|
|
|
* 1: Optic of secondary <STRING>
|
|
|
|
* 2: Optic of handgun <STRING>
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-16 12:15:14 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-02-10 04:22:10 +00:00
|
|
|
EXPLODE_1_PVT(_this,_unit);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-02-10 04:22:10 +00:00
|
|
|
private ["_array"];
|
2015-01-11 16:42:31 +00:00
|
|
|
_array = ["", "", ""];
|
|
|
|
|
|
|
|
if !(_unit isKindOf "CAManBase") exitWith {_array};
|
|
|
|
|
|
|
|
{
|
2015-01-16 12:15:14 +00:00
|
|
|
if (count _x >= 2) then {
|
|
|
|
_array set [_forEachIndex, _x select 2];
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
} forEach [primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit];
|
|
|
|
|
|
|
|
_array
|