mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
b7f48a912f
* Fix bad item replacements and switching to primary weapons * Update addons/irlight/functions/fnc_initItemContextMenu.sqf * Update fnc_initItemContextMenu.sqf * Remove unused funtions * Various fixes/tweaks - Added a weapon parameter to `switchAttachmentMode` - Made `switchPersistentLaser` take pointer switching into account - Fixed IR light attachments being added to the wrong weapon
28 lines
770 B
Plaintext
28 lines
770 B
Plaintext
#include "script_component.hpp"
|
|
|
|
call FUNC(initItemContextMenu);
|
|
|
|
["ACE3 Equipment", QGVAR(hold), LLSTRING(MomentarySwitch), {
|
|
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;
|
|
|
|
true
|
|
}, {
|
|
if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {};
|
|
|
|
// Save current weapon state to reapply later
|
|
private _weaponState = (weaponState ACE_player) select [0, 3];
|
|
|
|
action ["GunLightOff", ACE_player];
|
|
action ["IRLaserOff", ACE_player];
|
|
|
|
ACE_player selectWeapon _weaponState;
|
|
}] call CBA_fnc_addKeybind;
|