Skip to content

Commit

Permalink
feat(showHotwiringLabel): keeps engine on when config (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturMichalak committed Sep 3, 2024
1 parent a84afb4 commit 8b4ec1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ end
local isShowHotwiringLabelRunning = false
local function showHotwiringLabel(vehicle)
if not vehicle or not DoesEntityExist(vehicle) then return end
SetVehicleKeepEngineOnWhenAbandoned(vehicle, true)
if config.keepEngineOnWhenAbandoned then
SetVehicleKeepEngineOnWhenAbandoned(vehicle, true)
end

if getIsVehicleShared(vehicle)
or isShowHotwiringLabelRunning then return end
isShowHotwiringLabelRunning = true
Expand Down
2 changes: 2 additions & 0 deletions config/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ return {

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

keepEngineOnWhenAbandoned = true, -- when enabled, keeps a vehicle's engine running after exiting

-- Carjack Settings
carjackEnable = true, -- Enables the ability to carjack pedestrian vehicles, stealing them by pointing a weapon at them
carjackingTimeInMs = 7500, -- Time it takes to successfully carjack in miliseconds
Expand Down

0 comments on commit 8b4ec1e

Please sign in to comment.