From 8b4ec1e849d4fa0e784e1f324e08091c0db1efc6 Mon Sep 17 00:00:00 2001 From: HC DEV <36608116+ArturMichalak@users.noreply.github.com> Date: Tue, 3 Sep 2024 07:33:55 +0200 Subject: [PATCH] feat(showHotwiringLabel): keeps engine on when config (#115) --- client/main.lua | 5 ++++- config/client.lua | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index f075a5b..1a1205c 100644 --- a/client/main.lua +++ b/client/main.lua @@ -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 diff --git a/config/client.lua b/config/client.lua index 7a97d67..a0369ae 100644 --- a/config/client.lua +++ b/config/client.lua @@ -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