Adaptive Cruise Control with Speed Limit Enforcement [.Lua] v6

Gameplay Lua


Description


Adaptive Cruise Control with Speed Limit Enforcement [.Lua]

This script offers a smooth and realistic adaptive cruise control experience, allowing you to drive at the speed limit of your current location. It aims to provide a more natural feel compared to abrupt speed changes.

While enabled, external factors like gravity or collisions can still cause your vehicle to exceed the set speed limit.

How it Works

The default toggle button is bound to "INPUT_VEH_DUCK" (control index 48), which corresponds to:

  • X on PlayStation controllers with the swap handbrake option enabled
  • A on Xbox controllers with the swap handbrake option enabled
  • R1 on PlayStation controllers with default settings
  • RB on Xbox controllers with default settings
  • X on keyboard

Requirements

This script requires ScriptHookV and JM36 Lua Plugin.

Installation

Place "VehicleSpeedLimitCruiseControl.lua" in the "ScriptsDir-Lua/Modules" directory of your JM36 Lua Plugin.

Place "VehicleSpeedLimitCruiseControl.ini" in the "ScriptsDir-Lua" directory of your JM36 Lua Plugin. You can edit this file to change the keybind if desired.

Changelog

  • - v6: Fixed speed limiter toggle issues for keyboard users.
  • - v5: Implemented forward vehicle speed detection, allowing the script to respond to vehicles ahead.
  • - v3: Improved controller support with the swap handbrake option enabled. Firing weapons in vehicles no longer toggles cruise control.

First Upload: November 11, 2024 Last Updated: November 11, 2024


0 Comments