Lockpick Item Setup
Add lockpick items to your inventory
Has lockpick and advancedlockpick items by default
If you are using the same items as lockpicks in this script as used in other scripts you must make the following changes.
Navigate to config/config.lua
Locate Config.Lockpick
and set the following:
If using existing lockpick item:
UseExistingLockpickEvent = true,
You will need to trigger the following event when your lockpick is used
TriggerClientEvent('MK_VehicleKeys:Client:UseLockpick', source, 'lockpick', {Advanced = false})
If using existing advancedlockpick item:
UseExistingAdvancedLockpickEvent = true,
You will need to trigger the following event when your lockpick is used
TriggerClientEvent('MK_VehicleKeys:Client:UseLockpick', source, 'advancedlockpick', {Advanced = true})
Examples:
Navigate to qb-smallresources/server/consumables.lua
Locate QBCore.Functions.CreateUseableItem("lockpick", function(source)
function and add the TriggerClientEvent into it like this
QBCore.Functions.CreateUseableItem("lockpick", function(source)
TriggerClientEvent("lockpicks:UseLockpick", source, false)
TriggerClientEvent('MK_VehicleKeys:Client:UseLockpick', source, 'lockpick', {Advanced = false})
end)
Locate QBCore.Functions.CreateUseableItem("advancedlockpick", function(source)
function and add the TriggerClientEvent into it like this
QBCore.Functions.CreateUseableItem("advancedlockpick", function(source)
TriggerClientEvent("lockpicks:UseLockpick", source, true)
TriggerClientEvent('MK_VehicleKeys:Client:UseLockpick', source, 'advancedlockpick', {Advanced = true})
end)
Last updated