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.txtorzyke_lockpick/extras/items/qb-core.txtinto your inventory. For ox_inventory, that isdata/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 iconslockpick_wear_1tolockpick_wear_4are 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 stackablelockpick, so remove that entry first. Two entries with the same name conflict, and a stackable pick breaks pick wear.hook_pickis a separate item that leaves your existinglockpickto other scripts. Replacelockpickwithhook_pickin the firstConfig.Items.lockpicksentry, inConfig.Items.kit.lockpick, and inConfig.Items.usable.Also copy
tension_wrench, which every attempt needs.lockpick_kitis optional; setConfig.Items.kit = falseif you do not use it.Picks must not stack. Each one keeps its own durability, wear icon, and
lockpickIdin its metadata.
#Configuration
Edit
shared/unlocked/config.lua. Review the pick list, the kit, and the usable picks underConfig.Items. Removeveh_lockpickandveh_advancedlockpickif 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_liband your inventory before Lockpick, and Lockpick before any resource that uses it:cfgensure zyke_lib ensure zyke_lockpick ensure zyke_vehiclekeysOn start, the server and client consoles warn about any configured item your inventory does not know. Restart your inventory and
zyke_lockpickafter adding items.
#Verify Gameplay
Set
Config.Settings.debug = true, restart the resource, and run/lockpicktestto 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.