XyraLScripts
Installation guide

Taxi Job

A civilian taxi job with a live meter, street flag-downs, dispatched and player-called fares, ride ratings and a reputation ladder.

Requirements

Required

  • qbx_core or qb-core — the framework bridge detects which you run, so either works
  • ox_lib
  • ox_target
  • oxmysql

Not required

  • No SQL file to import. The three tables create themselves on first start.
  • No inventory resource. The taxi job does not use items.

Installation

  1. Drop the XS-TaxiJob folder into your resources directory.
  2. Add ensure XS-TaxiJob to your server.cfg, after your framework, ox_lib, ox_target and oxmysql.
  3. Restart the server. Watch the console for [XS-TaxiJob] database ready — 9 tables verified.
  4. Grant the admin ACE if you want the console:
    add_ace group.admin xs-taxijob.admin allow

Upgrading later is the same process. Drop the new folder in and restart — missing columns are added automatically. Always replace the whole folder rather than individual files; a partial upload surfaces as unrelated-looking errors elsewhere, and the resource runs a self-check two seconds after boot that will name any file that failed to load.

Configuration

Everything lives in config.lua. The values most servers change first:

  • Config.Depot.terminal, Config.Depot.dispatcher and Config.Depot.blip — where the cab office is. The defaults sit in Alta; move them to wherever your map puts one.
  • Config.Depot.cabSpawns — four bays. The same pool is used for taking a cab out and for returning it, and parking in one is what gets the deposit back.
  • Config.Vehicles.list — the roster, each entry with the reputation tier that unlocks it and the rate it pays.
  • Config.Meter — flagfall, per-km, waiting time, the night bonus window and the minimum fare.
  • Config.Flagdown — how often people flag the cab down, how far away they can be, and how long they will stand there.
  • Config.Bridges.keys — on 'auto' it finds qbx_vehiclekeys, qs-vehiclekeys or qb-vehiclekeys. Without one the cab will not start.

Anything an admin changes in the console's switches overrides the config file until the next restart. They are for handling a situation now, not for tuning the server.

The shift

  1. Sign on — talk to the dispatcher at the depot and take a cab. A deposit is held while it is out.
  2. Find work — three ways, below. The meter starts when somebody gets in.
  3. Drive — every fare starts at five stars and loses them for collisions, sustained speeding, flipping the cab or hurting the passenger. The rating sets the tip and the reputation earned.
  4. Sign off — park in a depot bay to get the deposit back. Damage comes off it.

The meter the driver sees is only ever a ceiling. The server re-derives the distance from its own two points and caps what can be claimed against the time taken, so nothing is trusted from the client.

Three ways to get work

Flag-downs. With the roof lamp on, people on the pavement put a hand out as the cab goes past. Pulling over takes them; driving on does not. /lamp is the off switch, so a driver heading back at the end of a shift can stop being stopped.

Dispatch. Ask the terminal for a fare and you get a pickup anywhere on the road network, with a drop-off the other side of it. The passenger is stood at the kerb before you arrive and walks to the cab, so you do not have to park on the marker.

Player calls. A player types /taxi and every driver with a lamp on gets the call; first to take it gets it. That one is open-ended — there is no destination, and the meter runs until the driver ends the ride where the passenger asks, from the terminal or with /endride.

  • Only the taxi model has a sign on its roof. On the other cabs the lamp is a state the job keeps rather than a bulb you can see.
  • Flag-downs claim the pedestrian by position rather than by entity, so two cabs driving past the same person cannot both take them.

Reputation and cabs

Five tiers. Reputation is earned per fare and scales with the rating, so a careful driver climbs roughly twice as fast as a reckless one. Each tier unlocks cabs on the roster and raises the multiplier on every fare, up to 1.35 at the top.

Cabs are rented, never owned. The deposit is held when you take one out and returned when you bring it back, minus a fee scaled to how much body damage it picked up. Sign off away from the depot and the deposit is gone.

Admin console

An Admin tab appears in the terminal for anyone holding the xstaxi.admin ACE. Every callback behind it checks the ace again on the server, so the hidden tab is a convenience rather than the security.

  • Overview — server totals and top earners.
  • Players — set level, grant XP, reset rating, give cash, clear a stuck job.
  • Fleet — inspect, repair and clear dispatch on any owned vehicle.
  • Companies — oversight and force-disband.
  • Control — around twenty economy knobs that persist and take effect immediately.
  • Logs — recent deliveries.

Before going live

  • Check the shop vehicle models. They are config values and some are DLC. Confirm each one exists on your build.
  • Move the depot — the terminal, the dispatcher and the four cab bays all ship as Alta coordinates.
  • Check your keys resource is detected, or drivers will not be able to start the cab.
  • Grant the admin ACE before expecting the Admin tab to appear.

Troubleshooting

The cab spawns but will not start

A vehicle-keys resource is running and was not detected. Set Config.Bridges.keys to its name instead of 'auto'.

There is no dispatcher at the depot

The dispatcher is a ped, and interacting with a ped needs ox_target or qb-target. Without either you get a marker and an E prompt on the same spot instead, which works the same. If you have a target resource and there is still nobody there, set Config.Debug = true and restart — it prints where it put them and whether it found ground.

Nobody ever flags me down

Check the lamp is on, with /lamp or the Street work card on the Shift screen. Flag-downs also need you moving, and only happen while you have no fare. Config.Flagdown.chance is per check, twice a second.

The Admin tab is not there

Set the ace and reconnect: add_ace group.admin xstaxi.admin allow. The tab is hidden without it, and every callback behind it checks the ace again on the server.

A tab sits on "Loading..."

A server callback threw before it could answer. Check the server console for the error rather than the F8 log — the panel is waiting on a reply that is never coming.

Updating

Replace the whole folder and restart. Schema changes apply themselves. There is no migration step and no SQL to run.

Support

Open an issue on GitHub, or ask in the Discord.