ACE3/addons/reload/initKeybinds.sqf
johnb432 44e0fdb6fa
Reload - Code cleanup and various improvements (#9343)
* Reload code cleanup

* Update fnc_startLinkingBelt.sqf

* Update addons/reload/functions/fnc_getAmmoToLinkBelt.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

---------

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
2023-08-28 14:26:24 -03:00

17 lines
685 B
Plaintext

#include "\a3\ui_f\hpp\defineDIKCodes.inc"
// Add Keybinds
["ACE3 Weapons", QGVAR(checkAmmo), LSTRING(checkAmmo), {
// Conditions: canInteract
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSwimming", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Ignore if controlling UAV (blocks radar keybind)
if (!isNull (ACE_controlledUAV param [0, objNull])) exitWith {false};
// Conditions: specific
if !(ACE_player call FUNC(canCheckAmmoSelf)) exitWith {false};
// Statement
[ACE_player, ACE_player] call FUNC(checkAmmo);
true
}, {false}, [DIK_R, [false, true, false]], false] call CBA_fnc_addKeybind; // Ctrl + R