[PAID][ESX][QB] Bus Driver Job

A script by Sandacz

No reviews yet.
[PAID][ESX][QB] Bus Driver Job main image

Full Description

We would like to present to you our Bus Driver Job resource. You can drive a bus around the city on a random bus line and take passengers to their destinations. You need to be careful to not damage the bus and sell correct tickets to customers. You need to always be departing on time at the bus stop, otherwise the passengers won’t make it to the bus stop or will be late! An extensive configuration file has been provided where you can change almost everything you want. Configuration options including colour of the markers, bus routes or even ticket colours. A tool for easy addition of new bus routes and has been provided. Watch the video below to see for yourself.

Features

  • Compatible with ESX locale system for translations (included by default: EN, PL, DE)
  • Customization options in config file
  • Excellent performance: idle: 0.00ms, job set: 0.00ms, driving: ±0.02ms-0.06ms (check the video) - Tested while recording on Ryzen 5 2600X, 16GB RAM, GTX 1660
  • Passengers are taken from the NPC population around the bus stop for better immersion. There is a chance for additional passengers to be spawned around the bus stop as a fallback.
  • No external dependencies other than ESX
  • Uses the FiveM Asset Escrow system
  • 6 bus routes included by default and a busstops.ymap file with bus stops placed around Los Santos
  • Basic cheater prevention measures included

Configuration Options

  • Locale
  • Bus model
  • Speed limit and damage checking can be disabled/enabled
  • Marker locations and colours
  • Job name to be used with the resource
  • Reward multipliers
  • Ticket prices (prices corelate to driver payout)
  • Ticket colors
  • Customizable speed limit for the bus (MPH or KM/H as a toggle)
  • Bus routes
  • Changeable functions to open notifications, give payout or progress bars (No progress bar is included by default, therefore there is no external dependencies, you can use your own resources like pNotify)
Changelog

v2.0.0 - 11.04.2025

  • Added compatibility with QBCore
  • New config options:
    • Config.isQBCore - Use QBCore methods or ESX
    • Config.useLegacyFuel - Use LegacyFuel exports when taking the bus out of the depot or repairing it.
  • Tweaked the config functions to take QBCore methods into account.
  • Removed the dependency of ESX locale system, now it is independent of it.
  • Added placeholder timeToReach in the bus line creator
  • When taking out the bus, it now always has 80% of the gas tank.
  • Since people didn’t change the ServerBanCheater method to accommodate for their own ban systems and txAdmin does not have a default API for bans, the cheating player is now also kicked from the server using DropPlayer method regardless of the ‘banCheater’ event being triggered. This lead to confusion of many people saying they were not getting paid (when they were setting very high ticket prices, and not adjusting the price limit)
  • Refactor camera functions for anticheat integration

v1.5.0 - 17.03.2023

  • Config.sharedObjectUseExportSv and Config.sharedObjectUseExportCl are now true by default
  • Ensured compatibility with latest ESX 1.9.x
  • fix FoundNextBusStop method not being triggered

v1.4.1 - 07.02.2023

  • Allow getting ESX shared object via export
  • New config options:
    • Config.sharedObjectUseExportSv (default false) (server) Specify if ESX shared object should be requested via event or export
    • Config.sharedObjectUseExportCl (default false) (client) Specify if ESX shared object should be requested via event or export
    • Config.sharedObjectResourceNameSv (default 'es_extended') (server) Resource name of ESX shared object (usually ‘es_extended’)
    • Config.sharedObjectResourceNameCl (default 'es_extended') (client) Resource name of ESX shared object (usually ‘es_extended’)

v1.4.0 - 06.09.2022

  • Added new config option:
    • Config.maximumPayout (default 3000) if a player exceeds this payout, they will get automatically banned
  • New language files line: anti_cheat_payout_invalid
  • Fixed a bug with Config being undefined on NUI, before it was received.

v1.3.0 - 20.05.2022

  • ClientSpawnBusCallback config function has been replaced by a different one, see below
  • Config options have been added:
    • FoundNextBusStop event, called when a bus stop blip on the map appears, so you can spawn your own peds if you wish.
    • BusIsBeingRepaired event, called when you try to repair a bus, you can add checks for player money for example in case you want to charge the player, etc.
    • BusIsBeingReturned event, called when you try to return the bus, so you can for example force the player to repair the bus first.
    • BusHasBeenTaken event, called when the bus spawns, replacement for ClientSpawnBusCallback config option.
    • BusIsBeingTaken event, called when you try to spawn the bus, so you can for example code your own check, for example verify if the player has a valid driver license, or perform a sobriety test. It’s up to you to add it.
  • The events above are executed on the client side
  • Bus spawn heading is not hardcoded anymore, you can change it in Config.spawn setting.
  • New bus creator command
    • bus_clear_points → clears all of the points on the list
  • Fixed a bug where the job did not cancel when you got too far away from the bus.
  • New line in the locales: Shown on the screen when the job has been cancelled when you get too far away from the bus.
  • The next bus stop is getting cleared of vehicles when you get close enough, this is done to prevent population buses from blocking you when you try to park at the bus depot to end the line.

It is very important to update your config file!

v1.2.0 - 18.01.2022

  • Added a new function to config that’s used to give player the reward after completion of the job
  • Reward level multipliers are now configurable
  • Added blip configuration options (color, sprite, scale, short range)

v1.1.0 - 17.01.2022

  • Added a new function to config that’s called after the bus has been spawned. this can be used to give keys to player or spawn trailers for two-section bus mods
  • Damage checking can be disabled in the config
  • Speed limit checking can be disabled in the config
  • Config.jobName can be set to = false to disable job checking, so anyone can be the bus driver

Tebex: Bus Driver Job

Showcase: