# Config

{% hint style="danger" %}
Follow the formatting specifications to avoid script startup errors
{% endhint %}

{% code title="config.lua" %}

```lua

--  ██████╗░██████╗░░█████╗░██╗░░░██╗███████╗   ████████╗██████╗░░█████╗░███╗░░██╗░██████╗██╗████████╗
--  ██╔══██╗██╔══██╗██╔══██╗██║░░░██║██╔════╝   ╚══██╔══╝██╔══██╗██╔══██╗████╗░██║██╔════╝██║╚══██╔══╝
--  ██████╦╝██████╔╝███████║╚██╗░██╔╝█████╗░░   ░░░██║░░░██████╔╝███████║██╔██╗██║╚█████╗░██║░░░██║░░░
--  ██╔══██╗██╔══██╗██╔══██║░╚████╔╝░██╔══╝░░   ░░░██║░░░██╔══██╗██╔══██║██║╚████║░╚═══██╗██║░░░██║░░░
--  ██████╦╝██║░░██║██║░░██║░░╚██╔╝░░███████╗   ░░░██║░░░██║░░██║██║░░██║██║░╚███║██████╔╝██║░░░██║░░░
--  ╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚══════╝   ░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚══╝╚═════╝░╚═╝░░░╚═╝░░░


--  ##############################################################################################
--  ##                                                                                          ##
--  ##   GENERAL                                                                                ##
--  ##                                                                                          ##
--  ##############################################################################################


Config = {}

Config.Framework = "ESX" -- Switch between ESX and QB Core : [ESX] = ESX | [QB] = QB-Core

Config.Template = true -- Toggle this to true if you bought the Template Pack : [true] = on | [false] = off

Config.StationText = "~INPUT_PICKUP~ Check Departures" -- 

Config.Job = false -- Only alow players with a specific job to start routes / control the bus : [true] = on | [false] = off

Config.JobName = "bus" -- Determine the job that the player needs | Jobname from ESX / QB Core

Config.JobGrade = 0 -- Determine the job grade that the player needs | Jobgrade from ESX / QB Core


--  ##############################################################################################
--  ##                                                                                          ##
--  ##   BUS SPECIFIC                                                                           ##
--  ##                                                                                          ##
--  ##############################################################################################


Config.BusModel = { -- The list of bus models that can be used with the script
	-713569950,
	-900114450,
	-877393872,
	-426835440
}

Config.BusPlate = "LST" -- The number plate prefix that will be used. MAXIMUM of 3 characters!

Config.BusTuning = true -- Toggle the use of the custom matrix feature : [true] = on | [false] = off
Config.BusStandByExtra = 1 -- Specify the extra used if the bus has no active route : 1 - 12


--  ##############################################################################################
--  ##                                                                                          ##
--  ##   KEYBINDS / BUS CONTROL                                                                 ##
--  ##                                                                                          ##
--  ##############################################################################################


Config.Keybinds = {  -- Specify the keybinds for controlling the bus
	{
		Haltestellen = 38, -- Keybind to open the UI of a bus stop : Default = E (38)
		Tuer1 = "1", -- Keybind to open the front door : Default = 1 ("1")
		Tuer2 = "2", -- Keybind to open the back door : Default = 2 ("2")
		Senken = "3", -- Keybind to lower the bus : Default = 3 ("3")
		Kneeling = "3", -- Keybind to open all doors and lower the bus automatically : Default = 3 ("3")
		Haltewunsch = "e", -- Keybind to open the UI of a bus stop : Default = E ("e")
		BusUI = "g" -- Keybind to open the UI for the driver : Default = G ("g")
	},
	{
		Haltestellen = "Open route schedule", -- "Open route schedule"
		Tuer1 = "Bus: Toogle door 1", -- "Bus: Toogle door 1"
		Tuer2 = "Bus: Toogle door 2", -- "Bus: Toogle door 2"
		Senken = "Bus: Toggle kneeling", -- "Bus: Toggle kneeling"
		Kneeling = "Bus: Toogle all", -- "Bus: Toogle all"
		Haltewunsch = "Bus: Stop request", -- "Bus: Stop request"
		BusUI = "Bus: Open driver hud" -- "Bus: Open driver hud"
	}
}

Config.Kneeling = false -- Automatic kneeling and door opening : [true] = on | [false] = off


--  ##############################################################################################
--  ##                                                                                          ##
--  ##   NOTIFICATIONS                                                                          ##
--  ##                                                                                          ##
--  ##############################################################################################


Config.NotifyText = { -- Notifications | MAXIMUM of 6 arguments | Default : type, title, text, duration
	{
		Test = {"error", "BraveTransit", "XYZ", 10000},
		DeleteUmlaufError = {"error", "BraveTransit", "Route could not be deleted.", 5000},
		DeleteUmlauf = {"success", "BraveTransit", "Route successfully deleted", 5000},
		StartRueckError = {"error", "BraveTransit", "Return route could not be started", 5000},
		StartRueck = {"success", "BraveTransit", " Return route successfully added", 5000},
		StartRouteError = {"error", "BraveTransit", "Route cannot be started, no bus found or route already started", 5000},
		StartRoute = {"success", "BraveTransit", "Route successfully started", 5000},
		HoldingRequestError = {"error", "BraveTransit", "Stop request already active", 5000},
		HoldingRequest = {"success", "BraveTransit", "Stop successfully requested", 5000},
		NextStop = {"info", "BraveTransit", "Station checked, drive to the next station", 5000},
		RouteEnd = {"success", "BraveTransit", "Route completed successfully", 5000},
		JobError = {"error", "BraveTransit", "You are not a bus driver", 5000},
	}
}

Config.Notify = function(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) -- Notification system | Default : BraveNotify ( https://bravescripts.tebex.io/package/5023502 )
	TriggerEvent('BraveNotify:Alert', Arg1, Arg2, Arg3, Arg4)
end


--  ##############################################################################################
--  ##                                                                                          ##
--  ##   STATIONS / ROUTES                                                                      ##
--  ##                                                                                          ##
--  ##############################################################################################


Config.Haltedauer = 5000 -- Milliseconds you need to wait at a bus stop before it gets checked | Default : 5000 (5 Seconds)

Config.Routen = { -- Routes
	
-- { RouteName, Color, {Stations}, VehicleExtraID, ReturnRouteID }

	-- {{"102", "#F3E400"}, {1, 2, 3, 4}, 4, 2, 2},
	-- {{"103", "#F3E400"}, {1, 2, 3, 4}, 4, 3, 1}

	{Name = "102", Color = "#F3E400", Stations = {1, 2, 3, 4}, VehicleExtra = 2, ReturnRoute = 2},
	{Name = "103", Color = "#F3E400", Stations = {1, 2, 3, 4}, VehicleExtra = 3, ReturnRoute = 1}
}

Config.Stationen = { -- Bus stops
	
-- { StationName, {CoordsOfBusStopStreet}, {CoordsOfBusStopSidewalk}, AnnouncementAudioFileName}

	{Name = "Strawberry", BusCoords = {261.2029, -1124.0927, 29.2091}, PlayerCoords = {264.1596, -1120.1956, 29.3658}, AudioFile = "Strawberry"},
	{Name = "Legion Square S", BusCoords = {354.4045, -1064.2611, 29.3975}, PlayerCoords = {352.8874, -1067.2596, 29.5835}, AudioFile = "LegionSquareSouth"},
	{Name = "Atlee St", BusCoords = {408.0810, -924.4500, 29.3065}, PlayerCoords = {410.7467, -922.9244, 29.4177}, AudioFile = "AtleeStreet"},
	{Name = "Dashound Bus Center", BusCoords = {461.2058, -619.7073, 28.4931}, PlayerCoords = {454.7494, -597.6921, 28.5569}, AudioFile = "DashoundBusCenter"}
}

```

{% endcode %}
