Lockpicking
All information you would need regarding lockpicking vehicles.
Lockpicking unlocks a locked vehicle's doors without a key. It doesn't start the engine or give a key, so a thief usually follows it up with hotwiring.
Vehicle Keys supports two lockpicking styles:
- zyke_lockpick minigame: a pin-by-pin lockpicking minigame played at the door handle. Used automatically while
zyke_lockpickis started. - Skill check: a skill check followed by a progress bar. Used when
zyke_lockpickisn't installed, or when forced in the config.
#Table of Contents
- Requirements
- Lockpicking a Vehicle
- Choosing the Minigame
- zyke_lockpick Minigame
- Skill Check
- Vehicle Restrictions
- Dispatch & Logs
- FAQ
#Requirements
- A lockpick item:
veh_lockpickorveh_advancedlockpickby default. - A locked vehicle nearby. Using a lockpick on an unlocked vehicle shows "This vehicle is already unlocked."
- Standing next to the driver door.
- Jamming the vehicle first if it is protected. See Signal Jammer.
#Lockpicking a Vehicle
#Stand at the driver door
Walk up to the front door of the locked vehicle.
#Use the lockpick
Your character crouches and starts working on the lock. An NPC sitting in the driver seat flees, and nearby peds within
witnessDistancemay witness the attempt.
#Complete the minigame
Either the zyke_lockpick minigame or the skill check runs, see below. Moving away from the door, ragdolling, falling or dying interrupts the attempt.
#Choosing the Minigame
lockpicking.minigame controls which style is used:
| Value | Behavior |
|---|---|
auto | Plays the zyke_lockpick minigame while zyke_lockpick is started, otherwise the skill check. Default. |
skillcheck | Always plays the skill check, even if zyke_lockpick is started. |
No other setup is needed. Vehicle Keys checks whether zyke_lockpick is started every time a lockpick is used, so ensuring it in your server.cfg is enough:
cfgensure zyke_lib ensure zyke_lockpick ensure zyke_vehiclekeys
#zyke_lockpick Minigame
The lock floats just outside the front door handle closest to the player, and the player picks it pin by pin.
lockpicking.pinssets the number of pins, from3to9(default6).- zyke_lockpick requires its tension wrench, and the lockpick item must be listed in zyke_lockpick's
Config.Items. If either is missing, zyke_lockpick notifies the player and the attempt doesn't start. - zyke_lockpick owns the pick's wear and breaking. Vehicle Keys'
itemUsageMode, the itemdurability,breakChance,failChanceandtimeToLockpickvalues don't apply in this mode. - The result is confirmed by zyke_lockpick's server before the vehicle unlocks.
Because veh_lockpick and veh_advancedlockpick must be listed in zyke_lockpick's Config.Items, make sure you add them there if you use zyke_lockpick.
#Skill Check
Without zyke_lockpick, or with minigame = "skillcheck":
- A skill check runs through each difficulty in
lockpicking.skillCheckin order.falseskips it. - A progress bar runs for
timeToLockpickseconds, multiplied by the item'stimeMultiplier. You can cancel it. - On a failure, the item loses durability or may break depending on
itemUsageMode:
| Mode | Behavior |
|---|---|
durability | Removes durability.success or durability.failure. At 0 durability the lockpick breaks. |
breakOnFail | Each failure has a breakChance percent chance to break the lockpick. |
disabled | The lockpick is never damaged. |
failChance makes a successful attempt fail anyway, and breakOnChanceFailure decides whether such a forced failure can also break the pick.
Cancelling the progress bar yourself has no penalty.
#Vehicle Restrictions
lockpicking.restrictedVehicles blocks lockpicking per vehicle type. true means the type can't be lockpicked.
| Type | Vehicles | Default |
|---|---|---|
temp | Temporary-key vehicles and NPC vehicles | Allowed |
personal | Player-owned vehicles | Allowed |
profession | Job vehicles | Blocked |
With blockInGarageSections enabled, lockpicking is also blocked inside Zyke Garages sections.
For anything else, edit CanLockpickKeyVehicle in the client or server hooks. See Integration Hooks.
#Dispatch & Logs
When the attempt starts, OnKeyRobbery is called with type = "lockpick" and stage = "started", and the ped witness check uses lockpicking.witnessDistance (default 15.0). Add your dispatch alert to the hook in server/unlocked/hooks.lua.
A successful lockpick is logged through LogKeyAction.
#FAQ
Q: Do I need zyke_lockpick? No. Without it, the skill check is used.
Q: I have zyke_lockpick but players still get the skill check. Make sure lockpicking.minigame is "auto" and that zyke_lockpick is started.
Q: The lockpick does nothing with zyke_lockpick started. The player is probably missing the tension wrench, or the lockpick item isn't in zyke_lockpick's Config.Items.
Q: Why aren't my durability settings applied? They only apply to the skill check. With zyke_lockpick, configure wear in zyke_lockpick.
Q: Why does it say I need to jam the signal first? The vehicle is protected by its class or a security module. See Signal Jammer.