Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions qbx_cruise/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ local function TriggerCruiseControl()
SetVehicleForwardSpeed(cache.vehicle, cruisedSpeed)
end

if IsControlJustPressed(1, 246) then
if IsControlJustPressed(1, 246) and cruisedSpeed == 0 then
TriggerEvent('seatbelt:client:ToggleCruise')
cruisedSpeed = GetEntitySpeed(cache.vehicle)
end

if IsControlJustPressed(2, 72) then
if IsControlJustPressed(1, 246) and cruisedSpeed > 0 then
cruisedSpeed = 0
TriggerEvent('seatbelt:client:ToggleCruise')
exports.qbx_core:Notify(locale('error.cruise_control_disabled'), 'error')
Expand Down