Skip to content

Commit

Permalink
refactor: rename config value to be clearer as to the behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed Aug 24, 2024
1 parent d23f314 commit 3db42dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ local function showHotwiringLabel(vehicle)
-- Hotwiring while in vehicle, also keeps engine off for vehicles you don't own keys to
if not isVehicleAccessible and cache.seat == -1 then
local isVehicleRunning = GetIsVehicleEngineRunning(vehicle)
if config.keepVehicleRunning and isVehicleRunning then
if config.getKeysWhenEngineIsRunning and isVehicleRunning then
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
else
SetVehicleNeedsToBeHotwired(vehicle, false)
Expand Down
3 changes: 1 addition & 2 deletions config/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ local defaultHoldupAnim = { dict = 'mp_am_hold_up', clip = 'holdup_victim_20s' }
return {
vehicleMaximumLockingDistance = 5.0, -- Minimum distance for vehicle locking

-- Lockpick Settings
keepVehicleRunning = true,
getKeysWhenEngineIsRunning = true, -- when enabled, gives keys to a player who doesn't have them if they enter the driver seat when the engine is running

-- Carjack Settings
carjackEnable = true, -- Enables the ability to carjack pedestrian vehicles, stealing them by pointing a weapon at them
Expand Down
6 changes: 3 additions & 3 deletions types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
---@field carjackingImmune? boolean
---@field lockpickImmune? boolean
---@field shared? boolean
---@field removeNormalLockpickChance number ratio
---@field removeAdvancedLockpickChance number ratio
---@field findKeysChance number ratio
---@field removeNormalLockpickChance? number ratio
---@field removeAdvancedLockpickChance? number ratio
---@field findKeysChance? number ratio

0 comments on commit 3db42dc

Please sign in to comment.