2015-01-23 22:40:39 +00:00
|
|
|
#define MACRO_LOCK_ACTIONS \
|
2015-04-28 05:08:28 +00:00
|
|
|
class ACE_SelfActions { \
|
2015-03-15 16:27:21 +00:00
|
|
|
class ACE_unlockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_UnLock); \
|
2015-03-15 16:27:21 +00:00
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
|
|
|
|
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \
|
|
|
|
priority = 0.3; \
|
2015-03-23 19:02:35 +00:00
|
|
|
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
|
2015-03-15 16:27:21 +00:00
|
|
|
}; \
|
|
|
|
class ACE_lockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lock); \
|
2015-03-15 16:27:21 +00:00
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
|
|
|
|
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \
|
|
|
|
priority = 0.2; \
|
2015-03-23 19:02:35 +00:00
|
|
|
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
|
2015-03-15 16:27:21 +00:00
|
|
|
}; \
|
|
|
|
class ACE_lockpickVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lockpick); \
|
2015-03-15 16:27:21 +00:00
|
|
|
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
|
|
|
|
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
|
|
|
|
priority = 0.1; \
|
|
|
|
}; \
|
2015-04-28 05:08:28 +00:00
|
|
|
}; \
|
|
|
|
class ACE_Actions { \
|
|
|
|
class ACE_MainActions { \
|
|
|
|
class ACE_unlockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_UnLock); \
|
2015-04-28 05:08:28 +00:00
|
|
|
distance = 4; \
|
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \
|
|
|
|
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \
|
|
|
|
priority = 0.3; \
|
|
|
|
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
|
|
|
|
}; \
|
|
|
|
class ACE_lockVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lock); \
|
2015-04-28 05:08:28 +00:00
|
|
|
distance = 4; \
|
|
|
|
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \
|
|
|
|
statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \
|
|
|
|
priority = 0.2; \
|
|
|
|
icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \
|
|
|
|
}; \
|
|
|
|
class ACE_lockpickVehicle { \
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Action_Lockpick); \
|
2015-04-28 05:08:28 +00:00
|
|
|
distance = 4; \
|
|
|
|
condition = QUOTE([ARR_3(_player, _target, 'canLockpick')] call FUNC(lockpick)); \
|
|
|
|
statement = QUOTE([ARR_3(_player, _target, 'startLockpick')] call FUNC(lockpick)); \
|
|
|
|
priority = 0.1; \
|
|
|
|
}; \
|
|
|
|
}; \
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
2015-01-23 22:40:39 +00:00
|
|
|
|
|
|
|
class CfgVehicles {
|
2015-03-15 16:27:21 +00:00
|
|
|
class LandVehicle;
|
|
|
|
class Car: LandVehicle {
|
2015-04-28 05:08:28 +00:00
|
|
|
MACRO_LOCK_ACTIONS
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-03-15 16:27:21 +00:00
|
|
|
class Tank: LandVehicle {
|
2015-04-28 05:08:28 +00:00
|
|
|
MACRO_LOCK_ACTIONS
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-03-15 16:27:21 +00:00
|
|
|
class Air;
|
|
|
|
class Helicopter: Air {
|
2015-04-28 05:08:28 +00:00
|
|
|
MACRO_LOCK_ACTIONS
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
|
|
|
|
2015-03-15 16:27:21 +00:00
|
|
|
class Logic;
|
|
|
|
class Module_F: Logic {
|
2015-05-30 05:31:07 +00:00
|
|
|
class ModuleDescription;
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-05-30 05:31:07 +00:00
|
|
|
class ACE_Module: Module_F {};
|
2015-05-30 04:37:41 +00:00
|
|
|
class ACE_VehicleLock_ModuleSetup: ACE_Module {
|
2015-05-27 20:04:41 +00:00
|
|
|
author = ECSTRING(common,ACETeam);
|
2015-03-15 16:27:21 +00:00
|
|
|
category = "ACE";
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(Module_DisplayName);
|
2015-04-28 05:08:28 +00:00
|
|
|
function = QFUNC(moduleInit);
|
2015-03-15 16:27:21 +00:00
|
|
|
scope = 2;
|
|
|
|
isGlobal = 0;
|
2015-03-23 19:02:35 +00:00
|
|
|
icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleLock_ca.paa));
|
2015-03-15 16:27:21 +00:00
|
|
|
functionPriority = 0;
|
|
|
|
class Arguments {
|
|
|
|
class LockVehicleInventory {
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(LockVehicleInventory_DisplayName);
|
|
|
|
description = CSTRING(LockVehicleInventory_Description);
|
2015-03-15 16:27:21 +00:00
|
|
|
typeName = "BOOL";
|
|
|
|
defaultValue = 0;
|
|
|
|
};
|
2015-04-28 05:08:28 +00:00
|
|
|
class VehicleStartingLockState {
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(VehicleStartingLockState_DisplayName);
|
|
|
|
description = CSTRING(VehicleStartingLockState_Description);
|
2015-05-09 18:43:55 +00:00
|
|
|
typeName = "NUMBER";
|
2015-03-15 16:27:21 +00:00
|
|
|
class values {
|
2015-05-27 17:04:25 +00:00
|
|
|
class None {name = CSTRING(VehicleStartingLockState_AsIs); value = 0; default = 1;};
|
|
|
|
class Side {name = CSTRING(VehicleStartingLockState_Locked); value = 1;};
|
|
|
|
class Unique {name = CSTRING(VehicleStartingLockState_Unlocked); value = 2;};
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
class DefaultLockpickStrength {
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(DefaultLockpickStrength_DisplayName);
|
|
|
|
description = CSTRING(DefaultLockpickStrength_Description);
|
2015-05-09 18:43:55 +00:00
|
|
|
typeName = "NUMBER";
|
|
|
|
defaultValue = "10";
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
|
|
|
};
|
2015-05-30 04:37:41 +00:00
|
|
|
class ModuleDescription {
|
2015-05-27 17:04:25 +00:00
|
|
|
description = CSTRING(Module_Description);
|
2015-03-15 16:27:21 +00:00
|
|
|
};
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
|
|
|
|
2015-05-30 04:37:41 +00:00
|
|
|
class ACE_VehicleLock_ModuleSyncedAssign: ACE_Module {
|
2015-05-27 20:04:41 +00:00
|
|
|
author = ECSTRING(common,ACETeam);
|
2015-03-15 16:27:21 +00:00
|
|
|
category = "ACE";
|
2015-05-27 17:04:25 +00:00
|
|
|
displayName = CSTRING(VehicleKeyAssign_Module_DisplayName);
|
2015-04-28 05:08:28 +00:00
|
|
|
function = QFUNC(moduleSync);
|
2015-03-15 16:27:21 +00:00
|
|
|
scope = 2;
|
|
|
|
isGlobal = 0;
|
2015-03-23 19:02:35 +00:00
|
|
|
icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleKey_ca.paa));
|
2015-03-15 16:27:21 +00:00
|
|
|
functionPriority = 0;
|
|
|
|
class Arguments {};
|
|
|
|
class ModuleDescription: ModuleDescription {
|
2015-05-27 17:04:25 +00:00
|
|
|
description = CSTRING(VehicleKeyAssign_Module_Description);
|
2015-03-15 16:27:21 +00:00
|
|
|
sync[] = {"AnyPlayer", "AnyVehicle"};
|
|
|
|
};
|
2015-01-23 22:40:39 +00:00
|
|
|
};
|
2015-06-02 20:14:32 +00:00
|
|
|
};
|