For the complete documentation index, see llms.txt. This page is also available as Markdown.

βš™οΈIntegration

Information about how to integrate our taxi system with your server's resources.

rahe-taxi has auto-detection for the most common fuel, vehicle key and garage resources. If you are running one of the supported systems, no setup is required β€” it just works.

If you use a custom or unsupported resource, you can plug it in by editing the corresponding file under public/api/. These files are unencrypted so you can adapt them to your systems.

The detection runs in a CreateThread at resource start and picks the first matching resource (by GetResourceState). If none match, an error is printed and you must implement the integration yourself.


Fuel system

File: public/api/cl_fuelsystem.lua (client-side)

Supported out of the box

  • LegacyFuel

  • qs-fuelstations

  • ox_fuel

  • cdn-fuel

  • lc_fuel

Function to implement

function setVehicleFuel(vehicle, fuel)
    -- vehicle: entity handle (client-side)
    -- fuel:    number 0-100
end

This is called when an NPC taxi vehicle is spawned and needs its fuel level set.

Adding your own fuel system

Add a new elseif branch in the detection thread, then add a matching branch in setVehicleFuel:

If everything else fails, the script falls back to the native SetVehicleFuelLevel.


Vehicle keys system

File: public/api/sv_vehiclekeys.lua (server-side)

Supported out of the box

  • qbx_vehiclekeys

  • qs-vehiclekeys

  • cd_garage

  • wasabi_carlock

  • Renewed-Vehiclekeys

  • qb-vehiclekeys

Function to implement

Called when a passenger gets into an NPC driver's taxi so the doors can be unlocked for them.

Adding your own keys system

The fallback unlocks the vehicle via the native SetVehicleDoorsLocked(vehicle, 1).


Garage system

File: public/api/sv_garagesystem.lua (server-side)

Supported out of the box

  • qbx_vehicles

  • qb-garages

  • esx_garage

Function to implement

Each entry returned must have this shape:

This is used by drivers to choose which of their owned vehicles to put on duty.

Vehicle naming

Display names come from the VEHICLES config (shared/vehicles.lua). If a model is not present there, an error is logged and the vehicle is skipped (qb/qbx) or returned with the raw model name (esx). Add your custom vehicles to that config to fix this.

Adding your own garage system

Add detection and a query branch. Example for a custom MySQL-backed garage:

Dispatch system

File: public/api/cl_dispatch.lua (client-side)

Used by the in-app safety report feature. When a rider or driver sends a safety report from the UI, the script forwards it to your dispatch / police-alert resource.

Supported out of the box

  • ps-dispatch

  • cd_dispatch

  • qs-dispatch

  • qb-policejob (default police:server:policeAlert event)

Function to implement

The localized text is built from RiderSafetyReport / DriverSafetyReport in the locale files. The current player's coordinates can be obtained inside the function via GetEntityCoords(PlayerPedId()).

Adding your own dispatch system

Add detection and a handler branch:

Last updated