2015-03-24 04:18:00 +00:00
|
|
|
// by esteldunedain
|
2015-01-18 14:30:57 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if !(hasInterface) exitWith {};
|
|
|
|
|
|
|
|
// Add keybinds
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectPistolNew), localize "STR_ACE_WeaponSelect_SelectPistol",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, handgunWeapon ACE_player] call FUNC(selectWeaponMode);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //1 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectRifleNew), localize "STR_ACE_WeaponSelect_SelectRifle",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //2 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectRifleMuzzleNew), localize "STR_ACE_WeaponSelect_SelectRifleMuzzle",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMuzzle);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //3 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectLauncherNew), localize "STR_ACE_WeaponSelect_SelectLauncher",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, secondaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //4 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectBinocularNew), localize "STR_ACE_WeaponSelect_SelectBinocular",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, binocular ACE_player] call FUNC(selectWeaponMode);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //5 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
|
|
|
["ACE3", QGVAR(SelectGrenadeFrag), localize "STR_ACE_WeaponSelect_SelectGrenadeFrag",
|
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player] call FUNC(selectGrenadeFrag);
|
2015-03-25 14:14:22 +00:00
|
|
|
true
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-03-05 07:32:26 +00:00
|
|
|
[7, [false, false, false]], false] call cba_fnc_addKeybind; //6 Key
|
|
|
|
|
|
|
|
["ACE3", QGVAR(SelectGrenadeOther), localize "STR_ACE_WeaponSelect_SelectGrenadeOther",
|
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player] call FUNC(selectGrenadeOther);
|
2015-03-25 14:14:22 +00:00
|
|
|
true
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-03-05 07:32:26 +00:00
|
|
|
[8, [false, false, false]], false] call cba_fnc_addKeybind; //7 Key
|
|
|
|
|
|
|
|
["ACE3", QGVAR(HolsterWeapon), localize "STR_ACE_WeaponSelect_HolsterWeapon",
|
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player] call FUNC(putWeaponAway);
|
2015-03-25 14:14:22 +00:00
|
|
|
true
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-03-05 07:32:26 +00:00
|
|
|
[11, [false, false, false]], false] call cba_fnc_addKeybind; //0 Key
|
|
|
|
|
|
|
|
["ACE3", QGVAR(EngineOn), localize "STR_ACE_WeaponSelect_EngineOn",
|
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {!isEngineOn vehicle ACE_player}) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
(vehicle ACE_player) engineOn true;
|
2015-03-25 14:14:22 +00:00
|
|
|
true
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-03-05 07:32:26 +00:00
|
|
|
[3, [false, false, false]], false] call cba_fnc_addKeybind; //2 Key
|
|
|
|
|
|
|
|
["ACE3", QGVAR(EngineOff), localize "STR_ACE_WeaponSelect_EngineOff",
|
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !(ACE_player != vehicle ACE_player && {ACE_player == driver vehicle ACE_player} && {isEngineOn vehicle ACE_player}) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
(vehicle ACE_player) engineOn false;
|
2015-03-25 14:14:22 +00:00
|
|
|
true
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-03-05 07:32:26 +00:00
|
|
|
[2, [false, false, false]], false] call cba_fnc_addKeybind; //1 Key
|
|
|
|
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectMainGunNew), localize "STR_ACE_WeaponSelect_SelectMainGun",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !(ACE_player != vehicle ACE_player) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, vehicle ACE_player, 0] call FUNC(selectWeaponVehicle);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //3 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectMachineGunNew), localize "STR_ACE_WeaponSelect_SelectMachineGun",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !(ACE_player != vehicle ACE_player) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, vehicle ACE_player, 1] call FUNC(selectWeaponVehicle);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //4 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
2015-04-20 19:10:56 +00:00
|
|
|
["ACE3", QGVAR(SelectMissilesNew), localize "STR_ACE_WeaponSelect_SelectMissiles",
|
2015-03-05 07:32:26 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !(ACE_player != vehicle ACE_player) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[ACE_player, vehicle ACE_player, 2] call FUNC(selectWeaponVehicle);
|
2015-04-20 19:10:56 +00:00
|
|
|
false
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-04-20 19:10:56 +00:00
|
|
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; //5 Key
|
2015-03-05 07:32:26 +00:00
|
|
|
|
|
|
|
["ACE3", QGVAR(FireSmokeLauncher), localize "STR_ACE_WeaponSelect_FireSmokeLauncher",
|
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-03-25 14:06:47 +00:00
|
|
|
if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-03-05 07:32:26 +00:00
|
|
|
// Conditions: specific
|
|
|
|
if !(ACE_player != vehicle ACE_player && {ACE_player == commander vehicle ACE_player}) exitWith {false};
|
|
|
|
|
|
|
|
// Statement
|
|
|
|
[vehicle ACE_player] call FUNC(fireSmokeLauncher);
|
2015-03-25 14:14:22 +00:00
|
|
|
true
|
2015-03-05 07:32:26 +00:00
|
|
|
},
|
2015-03-05 08:51:24 +00:00
|
|
|
{false},
|
2015-03-05 07:32:26 +00:00
|
|
|
[10, [false, false, false]], false] call cba_fnc_addKeybind; //9 Key
|