Skip to content

Commit

Permalink
Updated lockpick export with qb-minigames
Browse files Browse the repository at this point in the history
  • Loading branch information
singh-manavv committed Feb 12, 2024
1 parent 944eca9 commit 90e8a38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ function LockpickDoor(isAdvanced)
Config.LockPickDoorEvent()
end

function LockpickFinishCallback(success)
function LockpickFinishCallback()
local success = exports['qb-minigames']:Lockpick(5) -- number of tries
local vehicle = QBCore.Functions.GetClosestVehicle()

local chance = math.random()
Expand Down
2 changes: 1 addition & 1 deletion config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Config.UseKeyfob = false -- you can set this true if you dont need ui
Config.RemoveLockpickNormal = 0.5 -- Chance to remove lockpick on fail
Config.RemoveLockpickAdvanced = 0.2 -- Chance to remove advanced lockpick on fail
Config.LockPickDoorEvent = function() -- This function is called when a player attempts to lock pick a vehicle
TriggerEvent('qb-lockpick:client:openLockpick', LockpickFinishCallback)
LockpickFinishCallback()
end

-- Carjack Settings
Expand Down

0 comments on commit 90e8a38

Please sign in to comment.