Skip to content

Commit

Permalink
Update cruise.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
bicatcho11 authored Feb 13, 2024
1 parent c7ae9e0 commit e2aa829
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/cruise.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ local function TriggerCruiseControl()
if cruisedSpeed > 0 and GetVehicleCurrentGear(cache.vehicle) > 0 then

TriggerEvent('seatbelt:client:ToggleCruise')
exports.qbx_core:Notify('Cruise control enabled!', 'success')
exports.qbx_core:Notify(locale('success.cruise_control_enabled'), 'success')

CreateThread(function()
while cruisedSpeed > 0 and cache.vehicle do
Expand All @@ -42,7 +42,7 @@ local function TriggerCruiseControl()
if not turningOrBraking and speed < (cruisedSpeed - 1.5) then
cruisedSpeed = 0
TriggerEvent('seatbelt:client:ToggleCruise')
exports.qbx_core:Notify('Cruise control disabled!', 'error')
exports.qbx_core:Notify(locale('error.cruise_control_disabled'), 'error')
Wait(500)
break
end
Expand All @@ -59,7 +59,7 @@ local function TriggerCruiseControl()
if IsControlJustPressed(2, 72) then
cruisedSpeed = 0
TriggerEvent('seatbelt:client:ToggleCruise')
exports.qbx_core:Notify('Cruise control disabled!', 'error')
exports.qbx_core:Notify(locale('error.cruise_control_disabled'), 'error')
Wait(500)
break
end
Expand All @@ -76,7 +76,7 @@ RegisterCommand('togglecruise', function()
if vehicleClasses[vehicleClass] then
TriggerCruiseControl()
else
exports.qbx_core:Notify('Cruise control unavailable', 'error')
exports.qbx_core:Notify(locale('error.cruise_control_unavailable'), 'error')
end
end
end, false)
Expand Down

0 comments on commit e2aa829

Please sign in to comment.