Rideshare
AI-enhanced rideshare with surge pricing, ratings, tips and full OBX economy integration.
An immersive, app-based NPC rideshare for FiveM. Players book a ride from a sleek in-game app, an AI driver picks them up in a real (networked) vehicle, drives them to any preset destination or GPS waypoint, and drops them off with a receipt, rating prompt and tipping — all server-authoritative and exploit-hardened.
Part of the G.A.S. Team Developers FiveM script library.
Version: 2.1.0
Features
- 📱 Ride-hail app UI — live San Andreas map with position, destination pin and route; bottom-sheet destination list, ride-tier picker with transparent fare breakdown, in-ride trip card and full-screen receipt
- 🚕 Full ride loop — call, pickup, boarding, drive, drop-off, receipt
- 🧭 Any destination — curated preset list or the player's GPS waypoint
- 💰 Server-authoritative fares — distance-based pricing with min/max caps and city tax; the client never decides a price
- 🔥 Smart surge pricing — time-of-day brackets (rush hour, late night) plus live rider-load stacking, fully configurable
- 🚗 Three vehicle tiers — Economy / Premium / Luxury with price multipliers; ships with vanilla GTA cars and gracefully falls back if you configure an addon car that isn't streamed
- ⭐ Ratings & feedback tags — post-ride star rating with quick feedback chips, saved to MySQL
- 🎟️ Loyalty vouchers — 5-star ratings can roll a single-use discount on the next ride
- 💵 Tips — preset or custom percentage, validated server-side
- ↩️ Proportional refunds — cancelled rides refund based on distance not yet travelled; a failed vehicle spawn refunds 100%. Cancelling next to the destination counts as arriving, so refunds can't be exploited for free rides
- 👀 Networked vehicles — other players see the car and driver
- 🪪 Custom plates, driver blip, drive-away after drop-off — the driver pulls away realistically instead of vanishing
- 🗄️ MySQL ride history — auto-creates and auto-migrates its own table
- 📢 Optional Discord webhook logging — booked / completed / cancelled embeds
- 🌍 Localisation — all strings (including the UI) live in
locales/*.jsonvia ox_lib - 🔌 Framework auto-detect — Qbox, QBCore and ESX supported out of the box, no config needed
Anti-exploit hardening
- Fares, surge, vouchers, tips and refunds are computed only on the server
- Tips/ratings validate against the server's own record of your last ride — clients cannot tip arbitrary amounts, rate rides they didn't take, or farm loyalty vouchers
- Loyalty vouchers are consumed only at booking (never burned by opening the UI)
- Client-supplied coordinates are sanitised (NaN/inf/out-of-world rejected)
- Refund-on-cancel is distance-proportional and position-verified server-side
Requirements
- ox_lib
- oxmysql
- One of: qbx_core (Qbox), qb-core (QBCore) or es_extended (ESX) — detected automatically
- OneSync (standard on all modern servers)
Installation
- Drop the folder into
resources/[custom]/rr-rideshare/ - Add to your
server.cfg(after ox_lib, oxmysql and your framework):
``cfg ensure rr-rideshare ``
- (Optional) set your language:
setr ox:locale en - Start the server — the database table is created/migrated automatically.
Prefer manual SQL? Run
sql/install.sqland set nothing else. - Open
config.luaand tune to taste.
Usage
| Command | Description |
|---|---|
/ride | Open the booking app (command name configurable) |
/cancelride | Cancel the active ride (refund rules apply) |
/rideshare_stats | Admin: live surge multiplier / load |
Players can also bind the booking command to a key under GTA Settings → Key Bindings → FiveM.
Configuration highlights (config.lua)
| Section | What it controls |
|---|---|
Config.VehicleTiers | Tier labels, vehicle models (+ fallback model), price multipliers |
Config.Destinations | Preset destination list with map coords and UI category icons |
Config.PricePerUnit / MinPrice / MaxPrice / TaxRate | Fare math |
Config.Surge | Hour brackets, per-rider load bump, max multiplier |
Config.Refund | Refund percent, completion radius |
Config.Tips / Config.Ratings | Tipping presets, feedback tags, loyalty voucher odds |
Config.Commands / Config.Keybind | Command names and default keybind |
Config.Webhook | Discord logging |
Config.Database | Table name, enable/disable persistence |
Using your own cars
{
label = 'Luxury',
model = 'mybrabus', -- your addon car
fallback = 'schafter2', -- used if the addon isn't streamed
multiplier = 1.8,
...
}
For developers
Client exports
exports['rr-rideshare']:openRideUI() -- open the booking app from your own script
exports['rr-rideshare']:getConfig() -- read the resolved config table
Booking from another resource (e.g. a phone)
Trigger the server event directly:
TriggerServerEvent('rr-rideshare:server:bookRide', {
tierIndex = 2, -- 1-based index into Config.VehicleTiers
isWaypoint = true,
waypointCoords = { x = ..., y = ..., z = ... },
destLabel = 'Diamond Casino', -- optional custom label
payment = 'cash', -- optional: 'cash' or a numeric bank-account id
})
A numeric payment id is routed through the bank resource configured in Config.Bank via its server exports (list / debit / credit — export names are configurable). The account must belong to the paying player. Refunds are credited back to the same account. Without a hint the charge falls back to cash-first, then bank.
City tax integration
If Config.CityBank.enabled and the configured resource is running, the city tax portion of every fare is forwarded to its CollectTax(amount, source, memo, citizenid) export.
Database
Ride history is stored in rr_rideshare_history (configurable): destination, tier, fare breakdown, surge multiplier, tip, rating, feedback tag, status (active / completed / cancelled / abandoned) and refund amount.
Localisation
All player-facing text — notifications, HUD and the booking UI — lives in locales/en.json. Copy it to locales/<lang>.json, translate, and set setr ox:locale <lang> in your server.cfg.
FAQ
Does surge follow in-game time? Surge brackets follow the server's real clock (game-clock natives don't exist server-side). If your city syncs in-game time to real time, they line up 1:1.
What happens if a player disconnects mid-ride? The ride is closed as abandoned; no refund is issued (configurable behaviour planned).
Does it work without MySQL history? Yes — set Config.Database.enabled = false. Tips and ratings still work for the session; they just aren't persisted.
License
Commercial — see LICENSE. One license per purchasing community; redistribution or resale prohibited. (c) 2026 Real Results / G.A.S. Team Developers.
Support
- Website: gasteamdevelopers.com
- Issues: open one in this repo.
