This commit is contained in:
2026-07-07 21:08:52 +02:00
commit 4c20cfc716
2613 changed files with 318021 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
if Config.Cruise.Enable then
ESX.RegisterInput('esx_cruisecontrol:Enable', Translate('cruiseControl'), "keyboard", Config.Cruise.Key, function()
if not Utils.vehicle then return end
if CC.cruiseActive then
CC:Reset()
return
end
CC:Enable()
end)
ESX.RegisterInput('esx_cruisecontrol:IncreaseSpeed', Translate('increaseSpeed'), "keyboard", "ADD", function()
if not Utils.vehicle then return end
CC:ChangeSpeed(true)
end)
ESX.RegisterInput('esx_cruisecontrol:DecreaseSpeed', Translate('decreaseSpeed'), "keyboard", "SUBTRACT", function()
if not Utils.vehicle then return end
CC:ChangeSpeed(false)
end)
end
if Config.Seatbelt.Enable then
ESX.RegisterInput('esx_cruisecontrol:ToggleSeatbelt', Translate('toggleSeatbelt'), "keyboard", Config.Seatbelt.Key, function()
if not Utils.vehicle then return end
SB.seatbelt = not SB.seatbelt
SB:SetState(SB.seatbelt)
ESX.ShowNotification(Translate(SB.seatbelt and 'seatbeltOn' or 'seatbeltOff', 5000, 'info'))
end)
end