Added in ACE3 v3.0.0

Vehicle Lock Framework

1. Overview

These modules allow you to lock and unlock vehicles and their inventory using a key. Players don’t receive a key automatically.

2. Mission Setup

Vehicle Lock can be configured through a mission module or functions.

For key names, see Class Names.

Sync the module with vehicles and players. Custom keys will be handed to players for every synced vehicle. It is only valid for objects present at mission start.

3. Scripting

3.1 Adding Vehicle Key


Arguments Type Optional (default value)  
0 Unit Object Required
1 Vehicle Object Required
2 Use Custom Key Boolean Optional (default: false, false for side key, true for custom key)
R None None Return value

3.1.1 Example

[bob, car1, true] call ace_vehiclelock_fnc_addKeyForVehicle;

Arguments Explanation  
0 bob Unit the key will be added to
1 car1 Vehicle the key will work on
2 true Set custom key

3.2 Override Side

To override a vehicle’s side, allowing locking and unlocking using a different side’s key, use the following on that vehicle (use wanted side instead of west):

this setVariable ["ace_vehiclelock_lockSide", west];

3.3 Set Lock Pick Strength

To override default lock pick strength for a vehicle, that is how long lock picking will take, use the following on that vehicle (use wanted time in seconds instead of 5):

this setVariable ["ace_vehiclelock_lockpickStrength", 5];