Skip to content

Commit

Permalink
feat: toggle locks via distance check rather than raycast
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed Sep 25, 2024
1 parent d80d1f5 commit 0054b40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ togglelocksBind = lib.addKeybind({
defaultKey = 'L',
onPressed = function()
togglelocksBind:disable(true)
setVehicleDoorLock(getVehicleInFront(), nil, true)
local vehicle = lib.getClosestVehicle(GetEntityCoords(cache.ped), config.vehicleMaximumLockingDistance, true)
setVehicleDoorLock(vehicle, nil, true)
Wait(1000)
togglelocksBind:disable(false)
end
Expand Down

0 comments on commit 0054b40

Please sign in to comment.