Skip to content

Commit

Permalink
fix(toggleEngine): disable (#95)
Browse files Browse the repository at this point in the history
* fix(toggleEngine): disable

* fix(client/main): typo for keybind

* fix(toggleEngine): correct disable

---------

Co-authored-by: Solareon <[email protected]>
  • Loading branch information
artur-michalak and solareon authored Aug 1, 2024
1 parent ccd7bd5 commit 17ea585
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ local function showHotwiringLabel(vehicle)
if not (isVehicleAccessible or cache.seat ~= -1) then
local isVehicleRunning = GetIsVehicleEngineRunning(vehicle)
if config.keepVehicleRunning and isVehicleRunning then
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', qbx.getVehiclePlate(vehicle))
TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
else
SetVehicleNeedsToBeHotwired(vehicle, false)
setSearchLabelState(true)
Expand Down Expand Up @@ -281,12 +281,13 @@ engineBind = lib.addKeybind({
name = 'toggleengine',
description = locale('info.engine'),
defaultKey = 'G',
disabled = not cache.vehicle,
onPressed = function()
engineBind:disable(true)
toggleEngine(cache.vehicle)
Wait(1000)
engineBind:disable(false)
if cache.vehicle then
engineBind:disable(true)
toggleEngine(cache.vehicle)
Wait(1000)
engineBind:disable(false)
end
end
})

Expand Down

0 comments on commit 17ea585

Please sign in to comment.