Configuration

What to do when setting up the config

Running through the config

Triggers for the framework

These are the triggers set in the config for ESX and QBCore framework's. These can be changed however if you are using a custom framework there may be limited support due to how the framework could be written.

Triggers in the config

Debug option

If debug is set to true then your server console and all clients when loading in (framework check and job update prints) or when using the script (entity, location and various other variables to help me).

Debug option in config

Play Audio, Speed Unit and Speed Limit

PlayAudio if enabled = true then it will play the Audio name's audio reference. These are standard GTAV sound snippets. you can find the list of sound names here.

SpeedMultiplier is used to calculate the speed of the vehicle. If using Miles Per Hour (MPH) use:

2.236936

If using Kilometers Per Hour (KMPH / KPH) please set it as:

3.6

SpeedLimits is used to set speed limits when driving to the next bus stop or checkpoint. These are set in the routes in the customize.lua file.

PlayAudio, SpeedMultiplier and SpeedLimits options in config

Target System and Notifications

TargetSystem is for the target system you are using. The supported target options are: qb-target, ox_target, q-target and meta-target.

You can add your own if you wish within the bridge > client folder.

Framework Notifications

If using framework notifications then keep as true if not then change to false. You can change what event triggered in the framework notification in the bridge folder if using a custom notify system.

Target System and Notifications options in config

CutScene, BusStop, IsCashItem and CustomBlips

Cutscene is used to calculate how many peds are to spawn when at a bus stop. Min is the lowest amount and max is the highest amount. It is randomized every stop.

BusStop

The enable in BusStop is used to show off the box at a bus stop. If you don't wish to have this box to be seen then set to false. (If enabled it will slightly increase the resmon usage when the box is shown)

notification in BusStop (if enabled) is used to let you get a popup for how many bus stops you have done out of all the stops on the route.

IsCashItem

IsCashItem if enabled is used instead of giving you cash in an "account" (mentioned in PayoutReward below) it gives you it in your inventory. You must specify the items spawn code in the config for it to be spawned correctly into the players inventory.

CustomBlips

These are used when creating the next blip in the route and will set each type of stop to that blip. 513 is in the shape of a bus and 1 is just a blank circle. (It is coloured using the waypoint blipcolor later in the config.)

PayoutReward

The PerStop option is used for if the driver/ player gets paid for every ped getting on the bus:

Example: 4 peds get on bus at the current bus stop:

4 x 20 = $80

versus getting paid at the end of the route:

Example: amount of bus stop's x PedCost

11 stops x 20 = $220

Account is used for servers that don't use cash as an item. You can have it as either "cash" or "bank" by default. If you wish to use a different account label you can do so and change any functions needed in the bridge server files.

Payout Reward options in config

Penal System

If enabled then you will be fined at the end of the route. Else the following options won't matter If SpeedCheck is enabled then you will be fined for once you hit the minor amount of points (points are added when the driver goes over the current set speed limit.)

The same applies for HealthCheck just when the vehicle has a registered hit. (slow hits may not trigger lose of vehicle health. example: 5 MPH hitting a car/ lamp post).

Penal System options in config

Ped Options

This is a list of peds that can spawn to get on the bus. You can find more peds to add here.

Ped Option list in config

Time

If enabled then you will have a minimum and max time they can drive the local and express routes. If you want them to be able to run all routes during any time then set it to false. If you only want certain routes to be run all day and night then refer to how to in the Route section a little lower down.

Time options in config

Tier System

If enable is set to true then it will split the routes into their tiers. This is outlined in the Route section on how the routes get split.

System if set to "default" then it will use metadata in your framework.

Set which framework you use in the Framework option either "esx" or "qb".

If using qb-core and also using mz-skills then you can change it to "mz-skills".

You will need to change the Skill option to whichever option you want for your version of mz-skills to use.

Here is the bus example i use:

["Bus"] = {
        ["Current"] = 0,
        ["RemoveAmount"] = 0,
        ["Stat"] = "BUSJOB_ABILITY",
        ['icon'] = 'fas fa-route', 
},

the xpTable is used to set the amount of xp you need per level. this is used for both default systems and mz-skills.

xpReward is how much xp they get per route completed.

xpMultiplier if set to true will multiply xpReward by multiplier given for the tier of the route completed.

If route completed was tier 6 example:

5 x 2.4 = 12 xp gained for the route.

The xpMultiplierTable is where you can set the multiplier amount per tier. If you don't want to increase the amount of xp increased per route tier then set xpMultiplier to false.

Tier options in config

Job and NPC/ Ped

Job is what the job is marked as in the job listing

i.e. when using the /setjob coammand the job name would be "bus" that is what you would set in the config.

The SpawnLocation is a vector4 coord location for where you want the ped to spawn.

the model is the ped model being spawned.

The scenario is what the NPC is doing at the time. By default they are holding a clipboard.

Distance is used to set how far away you can third eye the NPC. default is set to 5.0 (would recommend a minimum of 2.0 and max of 5.0)

Job and NPC options in config

Waypoint

Waypoint is used for the GPS markers going around the minimap.

Blipcolour is for the actual blip/ circle on the map.

Routecolour is used for the line drawn to the blip/ circle at the destination.

You can find the colours needed to change here.

Waypoint options in config

Location Blip On Map

This Blip section is for the bus station blip.

Coord is for a vector3 location.

Sprite is for the icon used on the map can find more here.

Display is for setting blip display.

Scale is the size of the icon on the map.

Colour is the colour of the icon.

ShortRange is for if the icon will show in short range or not.

Name is for the name of the blip on the map.

If you see Lang['string'] like you do in the Name string below please look for the string in the square brackets in the language.lua file.

LoadDistance is used for when the box or checkpoint marker shows up on the client side.

Blip options in config

DrawText

Type has three options:

  • "ox_lib" for using ox_lib's drawtext option

  • "drawtext" for using your framework's drawtext option

  • "3dtext" for using the in built drawtext natives (requires gamebuild 2802)

Str is for the string used the default is used for ox_lib and drawtext options.

If using the 3dtext option change the Lang option to:

Lang['draw_marker_bus_stop']

Keybind is what button is used for triggering the peds to spawn/ leave the vehicle.

By default it is 38 which is [E]. You can find the other keybinds in

https://docs.fivem.net/docs/game-references/controls/#controls

If you change the keybind please change the keybind letter in the Lang option in language.lua

DrawText option in config

PlatformNumber and RouteNotification

PlatformNumber is used for giving the player a notification telling them where their bus is when spawned. By default it is set to true.

RouteNotification is for telling the driver after selecting the route which route there doing.

PlatformNumber and RouteNotification options in config

DrawMarker

Drawmarker is used for the checkpoint markers.

Type is the number used to choose your checkpoint's look. you can find all the options for checkpoints at https://docs.fivem.net/docs/game-references/markers/

Colour is used for changing the colour and transparency of the checkpoint using RGBA (RED, GREEN, BLUE, APLHA) these values go from 0 to 255. Alpha is your transparency option. I would recommend setting this up in a dev server first to play about with the colours if you don't want the default colour.

Scale is used to determine the size of checkpoint. it's set to 2.0 by default i would recommend a max size for 4.0 anything bigger and it might start clipping through roads depending on the checkpoint type.

DrawMarker options in config

Bus

Bus is used for the busses doors to open. There are multiple configurations for this.

The type is what defines which doors open when using that bus.

The spawncode for that vehicle is what is in the square brackets.

The types for doors opening are:

1 - Driver's Side Front Door

2 - Passenger's Side Front Door

3 - Driver's Side Front Door and Passenger's Side Front Door

4 - Driver's Side Front Door, Passenger's Side Front Door and Driver's Side Rear Door

5 - Driver's Side Front Door, Passenger's Side Front Door, Driver's Side Rear Door and Passenger's Side Rear Door

If you require more door options please let me know and i'll try to add them ASAP.

Bus options in config

Route

Route is used to define many of things for the route both in menu and for the vehicle options.

label is used for the route title for each route i.e. Route Number [insert routenumber here]. example being Route Number 30.

description is used to show a small description of the route in question. i.e. "Morningwood - Downtown LS via San Andreas Av"

icon is used to choose the icon in the menu set using ox_lib icon options. you can find all the usable icons here.

VehicleModel is the spawn code of the vehicle you are trying to spawn in.

SpawnLocation is for where you want the vehicle to be spawned using vector4 coords.

LiveryNumber when enabled will change livery options from 0 to whatever the bus's livery maxes out at.

RoofLiveryNumber when enabled will change roof livery options from 0 to whatever the bus's livery maxes out at. (this is sometimes used by vehicle creators to change certain parts of the vehicle in this case the route number options on the buses.) ExtraNumber is used to add an extra to the vehicle. (This will only currently add one extra at this time.)

PlatformNumber if PlatformNumber is enabled from the earlier options in the config then this will be used to display which number platform your bus has spawned in at.

Tier is used when Tier is enabled from earlier to split the routes into their correct tiers when the menu is opened.

RouteNumber is used to show the correct route number for the route in the menu and also is used for the route notification when the bus is spawning in if the notifcation is enabled.

ServiceType is how you define which route service it is. Local, Express or Rapid.

Local is written:

Lang["route_type_local"]

Express is written:

Lang["route_type_express
"]

Rapid is written:

Lang["route_type_rapid"]

StartingBusStop is used to define your first bus stop location. using Lang['next_busstop']:format("Pacific Bluffs") as the example you just need to write a description into the brackets. so whether it's going to a point of interest like "Davis Courthouse" or just the road name "Pacific Bluffs"

Lang['next_busstop']:format("Pacific Bluffs")
Route options in config

Last updated