Configuration
Configuration guide of Auto Pilot Script.
Auto Pilot Script Configuration Guide
This guide provides detailed instructions for configuring the Auto Pilot Script for FiveM. The script allows players to enable autopilot for specific vehicles, providing a seamless and automated driving experience. Configuration options include framework detection, vehicle restrictions, notifications, and more.
Main Configuration
Config.Framework
Description: This setting determines which framework the script will utilize. The options are
"esx"
,"qb"
, or"auto"
. When set to"auto"
, the script automatically detects the active framework on the server. Use"auto"
for flexibility or manually set the framework based on your server setup.Example:
Config.debug
Description: Enables or disables debug mode. When
true
, the script will output detailed information to the console, which can be helpful for troubleshooting during development or testing. Keep itfalse
for regular use to avoid unnecessary console messages.Example:
Config.hideCmd
Description: This setting allows you to define a custom command that players can use to hide the autopilot user interface. It can be helpful for players who prefer a cleaner HUD or only want to display the interface when needed.
Example:
Vehicle Access
Config.allCarsAllowed
Description: This option controls whether all vehicles are allowed to use autopilot. Set this to
true
if you want to enable autopilot for every vehicle. If set tofalse
, only the vehicles listed inallowedCars
will be able to use autopilot.Example:
Config.allowedCars
Description: If
Config.allCarsAllowed
is set tofalse
, this table defines which vehicles can use the autopilot system. You can list vehicle models by their spawn name, allowing autopilot only for specific cars.Example:
Locales
Config.Locales
Description: This section allows you to customize the messages displayed to players when autopilot is activated or deactivated. You can easily change the text to fit your server's language or tone.
Example:
Notifications
Config.Notify
Description: This setting allows you to choose between the default notification system or implementing a custom notification function. Set to
"default"
for standard notifications or"custom"
if you want to create your own.Example:
Config.NotifyFunction
Description: If you choose
"custom"
forConfig.Notify
, this function allows you to define how the notifications are triggered. Insert your custom notification logic here to replace the default behavior.Example:
Framework Detection
getFramework()
Description: This function automatically detects and returns the active framework being used. It supports ESX, QBCore, or automatic detection. This ensures the script works seamlessly with the server's setup.
Example:
Last updated