2015-02-14 06:39:01 +00:00
|
|
|
// by commy2
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-05-24 23:57:41 +00:00
|
|
|
["ace_flashbangExploded", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler;
|
2015-02-14 06:39:01 +00:00
|
|
|
|
2015-09-11 14:58:26 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
2015-02-14 06:39:01 +00:00
|
|
|
|
|
|
|
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
|
|
|
|
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
|
|
|
|
|
|
|
|
// Add keybinds
|
2015-05-28 19:59:04 +00:00
|
|
|
["ACE3 Weapons", QGVAR(switchGrenadeMode), localize LSTRING(SwitchGrenadeMode),
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-20 22:55:39 +00:00
|
|
|
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
2016-02-20 21:41:24 +00:00
|
|
|
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
2015-02-14 06:39:01 +00:00
|
|
|
|
2015-03-05 07:32:26 +00:00
|
|
|
// Statement
|
|
|
|
[] call FUNC(nextMode);
|
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-09-26 20:39:12 +00:00
|
|
|
[9, [false, false, false]], false] call CBA_fnc_addKeybind; //8 Key
|
2016-02-06 20:20:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Register fire event handler
|
2016-05-24 13:13:11 +00:00
|
|
|
["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
|
|
|
["ace_firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|
|
|
|
["ace_firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler;
|