Skip to content

Commit

Permalink
refactor(config/client): added types (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Jul 28, 2024
1 parent 8d8b124 commit 9a64477
Show file tree
Hide file tree
Showing 2 changed files with 347 additions and 291 deletions.
4 changes: 2 additions & 2 deletions client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function public.lockpickDoor(isAdvancedLockedpick, maxDistance, customChallenge)
or config.anims.lockpick.model[GetVehicleClass(vehicle)]
or config.anims.lockpick.default
lib.playAnim(cache.ped, anim.dict, anim.clip, 3.0, 3.0, -1, 16, 0, false, false, false) -- lock opening animation
local isSuccess = customChallenge or lib.skillCheck(skillCheckConfig[1], skillCheckConfig[2])
local isSuccess = customChallenge or lib.skillCheck(skillCheckConfig.difficulty, skillCheckConfig.inputs)

if getIsVehicleInRange(vehicle, maxDistance) then -- the action will be aborted if the opened vehicle is too far.
lockpickCallback(vehicle, isAdvancedLockedpick, isSuccess)
Expand Down Expand Up @@ -312,7 +312,7 @@ function public.hotwire(vehicle, isAdvancedLockedpick, customChallenge)
or config.anims.hotwire.model[GetVehicleClass(vehicle)]
or config.anims.hotwire.default
lib.playAnim(cache.ped, anim.dict, anim.clip, 3.0, 3.0, -1, 16, 0, false, false, false) -- lock opening animation
local isSuccess = customChallenge or lib.skillCheck(skillCheckConfig[1], skillCheckConfig[2])
local isSuccess = customChallenge or lib.skillCheck(skillCheckConfig.difficulty, skillCheckConfig.inputs)

hotwireCallback(vehicle, isAdvancedLockedpick, isSuccess)

Expand Down
Loading

0 comments on commit 9a64477

Please sign in to comment.