Skip to main content

What is FR Dealership?

FR Dealership (v1.2.0) is FiveRank's free dealership and garage for FiveM. It features a cinematic showroom with a live turntable, vehicle financing, real ownership stored in the database, and exports so other scripts can validate ownership.

The dealership your server deserves — free, open-source and production-ready.


What's included?

Cinematic showroom

The selected vehicle spawns on a podium with an orbiting turntable camera, live performance bars (speed, acceleration, braking, handling) and seat count. The camera orbits the car as the player browses the catalog.

Full catalog by category

9 built-in categories — Compact, Sedan, SUV, Coupe, Muscle, Sports, Super, Off-Road and Motorcycle — fully configurable in config.lua. Adding a custom or add-on car is a single line.

Color picker

Preview paint colours live before buying. Available colours are defined in Config.Colors.

Cash or bank payment

Real-time affordability feedback: if the player does not have enough funds in the chosen account, the buy button shows it before confirming.

Vehicle financing (instalments)

Buy a car in instalments with a configurable down payment and interest. Missed payments impound the vehicle (it cannot be taken out of the garage) and grow the debt with late fees; long-term default repossesses the car and bans the player from financing for a configurable period.

Personal garage

Take vehicles out, store them back (saving all properties) or sell them back to the dealer for a configurable percentage. Multiple garages on the map — vehicles are shared across all of them.

Authoritative server-side ownership

Every purchase writes to fr_owned_vehicles with a unique generated plate. The server never trusts the client for price, label or ownership.

Exports for other scripts

-- Returns true if the player (source) owns the given plate.
exports['fr_dealership']:IsOwner(source, plate)

-- Returns the owner identifier for a plate, or nil.
exports['fr_dealership']:GetOwner(plate)

fr_carlock uses IsOwner so players can only lock/unlock cars they own.

Test drive

Try any vehicle before buying. A temporary, non-networked copy spawns at the airport for a configurable duration. The car cannot be stored, sold or kept and leaving the geofence ends the test early.


Dependencies

DependencyTypeNotes
oxmysqlRequiredOnly hard dependency
ESX Legacy (es_extended)FrameworkAuto-detected at runtime
QBCore (qb-core)FrameworkAuto-detected at runtime
fr_interactOptionalFloating "press E" prompts; falls back to native if not running
fr_notifyOptionalStyled notifications; falls back to framework notifications

The script is 100% framework-agnostic: ESX and QBCore are mapped via a bridge (server/framework.lua + client/framework.lua) with no configuration needed.


Database tables

Tables are created automatically on first start. If you prefer to create them manually, import the included sql/fr_dealership.sql file.

TablePurpose
fr_owned_vehiclesPurchased vehicles with plate, properties, status and impound state
fr_vehicle_loansActive loans with remaining instalments and status
fr_finance_bansPlayers temporarily banned from financing due to default

Credits