This script uses QBCore notifications. To make this script standalone, remove all the QBCore.Functions.Notify in client/main.lua.
This script uses interact-sound. To use the provided sounds, ensure to have that resource, and follow the interact-sound guide on how to add sounds.
Features
Vehicle Models
Only allow certain vehicle models to use autopilot.
Configure the table in config.lua.
Keymapping
Adds the ability for your community to change their keybinds to their desires. Default: N to engage/disengage autopilot. Default:UPARROW to increase/decrease speed.
Vehicle Body Health
Option to turn on/off.
Disengage autopilot if the vehicles body health is less than the configured percentage during the drive.
Different Autopilot Speeds
Three different speeds during autopilot. Configured through config.lua.
Smooth Braking
Slows down the vehicle at a reasonable phase when reaching your destination.
Optimization
0.00ms - Majority of the time.
0.01ms - During braking sequence & keymapping.
You can change the driving style by modifying the values of the native TaskVehicleDriveToCoord.
Do a search within the script to find the native, there are 4 of them in the script.
A good guide for driving styles can be found here.
Hey man, i love that script but one big problem still left… i cannot add addon vehicles to the list. They just dont work… only gta standard vehicles work.
“CYCLONE”, “ASEA”, “PBUS” and so on… just vanilla cars works fine.
I am having a similar issue as mentioned above. Running qbcore but addon cars (like the tesla or urus) do not register the autopilot events. I have added them to config in lowercase and allcaps but nothing seems to work unless it is a default GTA car.
We are still testing but have not found an addon that is working yet. Are you using any addon//import vehicles in your environment? If so, which spawn names are working?
Yes. Every car I’ve tried has worked. I just recently downloaded and tested with the linked one below. That worked as well. If you are using dashses or similar symbols on your vehicle spawn-name then that may be a reason why.
To everyone having an issue with certain addon cars not working with this script I have found the solution. The problem lies within the car files. If you go into the vehicles meta file, check the game Name. If that doesn’t match the spawn name you are putting in the script the that is why it is not working. Simply change the name to match and you are good to go. If you have a lot of addon cars like this you will have to do it to all of them unfortunately but your cars should perform better with scripts that way.