Documentation

Setup

Install and configure Lockpick.

#Dependencies

Install zyke_lib, and configure its framework, inventory, and notification providers. See Dependencies.

#Resource

Place the resource in your server's resources folder as zyke_lockpick.

#Items

Copy the matching definitions from zyke_lockpick/extras/items/ox_inventory.txt or zyke_lockpick/extras/items/qb-core.txt into your inventory. For ox_inventory, that is data/items.lua; for qb-core, qb-core/shared/items.lua.

Copy every icon in extras/items/images/256/ into your inventory's image folder (for ox_inventory, web/images). The wear-stage icons lockpick_wear_1 to lockpick_wear_4 are needed whichever pick name you choose.

The pick ships under two names. Copy only one of them:

  • lockpick (default) replaces the common default lockpick. Most inventories already define a stackable lockpick, so remove that entry first. Two entries with the same name conflict, and a stackable pick breaks pick wear.
  • hook_pick is a separate item that leaves your existing lockpick to other scripts. Replace lockpick with hook_pick in the first Config.Items.lockpicks entry, in Config.Items.kit.lockpick, and in Config.Items.usable.

Also copy tension_wrench, which every attempt needs. lockpick_kit is optional; set Config.Items.kit = false if you do not use it.

Picks must not stack. Each one keeps its own durability, wear icon, and lockpickId in its metadata.

#Configuration

Edit shared/unlocked/config.lua. Review the pick list, the kit, and the usable picks under Config.Items. Remove veh_lockpick and veh_advancedlockpick if you do not run Vehicle Keys. Use the Config reference for current defaults.

Reactions to started and finished attempts belong in server/unlocked/hooks.lua. See Exports & Events.

#Start Order

Start zyke_lib and your inventory before Lockpick, and Lockpick before any resource that uses it:

cfg
ensure zyke_lib
ensure zyke_lockpick
ensure zyke_vehiclekeys

On start, the server and client consoles warn about any configured item your inventory does not know. Restart your inventory and zyke_lockpick after adding items.

#Verify Gameplay

Set Config.Settings.debug = true, restart the resource, and run /lockpicktest to open a practice lock. See Commands.

For a real attempt, carry a pick and a tension_wrench, and pick a lock offered by an integrated resource, such as a locked vehicle with Vehicle Keys. Check that the pick's icon changes as it wears.