NullSect
Systems nominal

Docs / Bus / Installation

Installation

1. Requirements

  • A FiveM server with OneSync
  • sv_entityLockdown off or relaxed for networked passengers (with strict, set Config.Passengers.Networked = false)
  • MariaDB or MySQL
  • ox_lib, oxmysql
  • One framework: qbx_core, qb-core or es_extended

2. Files

Place the ns-bus folder in your resources, for example resources/[nullsect]/ns-bus.

3. Start order

ns-bus must start after its dependencies and your framework:

ensure oxmysql
ensure ox_lib
ensure qbx_core        # or qb-core / es_extended
ensure ox_target       # or qb-target
ensure ns-bus          # or: ensure [nullsect]

Vehicle keys, fuel, inventory and dispatch resources may start before or after ns-bus: they are looked up again when they are needed.

4. Database

Nothing to do by default: with Config.Database.AutoMigrate = true the resource creates its tables on first start and applies future updates without touching existing data.

If you prefer to manage the schema yourself, set AutoMigrate = false and import sql/bus.sql. When an update needs a new migration and AutoMigrate is off, the resource stops with a clear console message instead of running on an old schema.

5. Permissions

add_ace group.admin ns-bus.admin allow
add_ace group.admin ns-bus.dev allow

ns-bus.dev only matters when Config.Debug.Commands = true.

6. Check

On start the console shows:

[ns-bus] database migration 1 (core_profiles) applied
...
[ns-bus] database migration 8 (tickets) applied
[ns-bus] ready (framework: qbox, locale: en, schema: v8, vehicle keys: qbx_vehiclekeys)

(one line per migration, 1 to 8, on a fresh database)

The interface (nui/) needs nothing else: its fonts are inside the resource and nothing is loaded from the internet. Servers that want no NUI set every Config.UI option to the ox_lib version.

If you see no supported framework found, the framework is not started before ns-bus or Config.Framework names one that is not running.

7. First steps

  1. Set your depot in Config.Depots (desk ped, bus spawns, return point, optional service point); /buscoords copies your position as vector4 (developer command).
  2. Open /busadmin, create stops where you stand (waiting area, passenger spawns, boarding and exit points, optional inspection point), then build a route from them.
  3. Test the route with a test drive from the admin dashboard, then start a shift at the desk.

8. Keys players should know

KeyWhat
F6Route menu (between routes: the dashboard)
1 / 2 / 3Answer a passenger or an officer (only while the card is up)
Y / NLet in / refuse the passenger at the door (only while someone is at the door)
KTicket machine, on a bus that is on a route (riders buy, the driver offers tickets)
Y / NPay / decline a ticket the driver offers you (only while the offer is up)
E / GReturn the bus / service bay (at the return point or the service point)
XCancel a service job

F6, K, 1 / 2 / 3 and Y / N can be rebound in GTA settings (Key Bindings > FiveM); E, G and X are fixed game controls used only at those points. pma-voice uses N for push-to-talk by default: rebind one of them on voice servers.

Cart

Your cart is empty.