2023-09-17 07:32:39 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2024-08-11 15:08:50 +00:00
|
|
|
call FUNC(initItemContextMenu);
|
2023-09-17 07:32:39 +00:00
|
|
|
|
|
|
|
["ACE3 Equipment", QGVAR(hold), LLSTRING(MomentarySwitch), {
|
2024-08-11 15:08:50 +00:00
|
|
|
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {};
|
|
|
|
|
|
|
|
// Save current weapon state to reapply later
|
|
|
|
private _weaponState = (weaponState ACE_player) select [0, 3];
|
|
|
|
|
|
|
|
action ["GunLightOn", ACE_player];
|
|
|
|
action ["IRLaserOn", ACE_player];
|
|
|
|
|
|
|
|
ACE_player selectWeapon _weaponState;
|
|
|
|
|
2023-09-17 07:32:39 +00:00
|
|
|
true
|
|
|
|
}, {
|
2024-08-11 15:08:50 +00:00
|
|
|
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {};
|
|
|
|
|
|
|
|
// Save current weapon state to reapply later
|
|
|
|
private _weaponState = (weaponState ACE_player) select [0, 3];
|
2023-09-17 07:32:39 +00:00
|
|
|
|
2024-08-11 15:08:50 +00:00
|
|
|
action ["GunLightOff", ACE_player];
|
|
|
|
action ["IRLaserOff", ACE_player];
|
|
|
|
|
|
|
|
ACE_player selectWeapon _weaponState;
|
|
|
|
}] call CBA_fnc_addKeybind;
|