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 { \
displayName = " $STR_ACE_Vehicle_Action_UnLock " ; \
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 { \
displayName = " $STR_ACE_Vehicle_Action_Lock " ; \
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 { \
displayName = " $STR_ACE_Vehicle_Action_Lockpick " ; \
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 { \
displayName = " $STR_ACE_Vehicle_Action_UnLock " ; \
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 { \
displayName = " $STR_ACE_Vehicle_Action_Lock " ; \
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 { \
displayName = " $STR_ACE_Vehicle_Action_Lockpick " ; \
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 {
class ModuleDescription { } ;
2015-01-23 22:40:39 +00:00
} ;
2015-03-15 16:27:21 +00:00
class ACE_VehicleLock_ModuleSetup : Module_F {
author = " $STR_ACE_Common_ACETeam " ;
category = " ACE " ;
displayName = " Vehicle Lock Setup " ;
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 {
displayName = " Lock Vehicle Inventory " ;
description = " Locks the inventory of locked vehicles " ;
typeName = " BOOL " ;
defaultValue = 0 ;
} ;
2015-04-28 05:08:28 +00:00
class VehicleStartingLockState {
displayName = " Vehicle Starting Lock State " ; // Argument label
description = " Set lock state for all vehicles (removes ambiguous lock states) " ; // Tooltip description
2015-03-15 16:27:21 +00:00
typeName = " NUMBER " ; // Value type, can be "NUMBER", "STRING" or "BOOL"
class values {
class None { name = " As Is " ; value = 0 ; default = 1 ; } ;
class Side { name = " Locked " ; value = 1 ; } ;
class Unique { name = " Unlocked " ; value = 2 ; } ;
} ;
} ;
class DefaultLockpickStrength {
displayName = " Default Lockpick Strength " ;
description = " Default Time to lockpick (in seconds). Default: 10 " ;
typeName = " NUMBER " ; // Value type, can be "NUMBER", "STRING" or "BOOL"
defaultValue = " 10 " ; // Default text filled in the input box
} ;
} ;
class ModuleDescription : ModuleDescription {
description = " Settings for lockpick strength and initial vehicle lock state. Removes ambiguous lock states.<br/>Source: vehiclelock.pbo " ;
} ;
2015-01-23 22:40:39 +00:00
} ;
2015-03-15 16:27:21 +00:00
class ACE_VehicleLock_ModuleSyncedAssign : Module_F {
author = " $STR_ACE_Common_ACETeam " ;
category = " ACE " ;
displayName = " Vehicle Key Assign " ;
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 {
description = " Sync with vehicles and players. Will handout custom keys to players for every synced vehicle. Only valid for objects present at mission start.<br/>Source: vehiclelock.pbo " ;
sync [ ] = { " AnyPlayer " , " AnyVehicle " } ;
} ;
2015-01-23 22:40:39 +00:00
} ;
} ;