3M Dealership –Free  Cinematic Dynamic Dealership, Finance & Used Market

Documentation

At documentation file you can search for guidelines, error fixes and find answers to your questions.

https://3m-studio.gitbook.io/3m-documentation/

3M Dealership – Cinematic Dynamic Dealership, Finance & Used Market

3M Dealership replaces boring “press E to buy a car” menus with a full dealership ecosystem: cinematic deliveries, safe test drives, dynamic pricing, finance contracts and a proper used-car lot – all driven by your players’ activity.

PREVIEW

Core Features

  • Cinematic dealership flow

    • NPC salesman with ox_target or classic 3D prompts.

    • Clean dark NUI with vehicle list, brands, categories and detailed info.

    • Showroom vehicles placed in the world, mapped to the NUI list.

    • After purchase, a key NPC hands over the keys and plays a short cinematic delivery at the configured spawn.

  • Test drives with anti-exploit

    • Configurable duration, spawn and behaviour (Config.TestDrive).

    • Player is teleported back to their start position when the drive ends.

    • Anti-exploit layer:

      • Block storing the test-drive vehicle in garages.

      • Block mod shops.

      • Optional despawn when leaving the area or leaving the vehicle.

  • Dynamic market (48h popularity)

    • vehicle_market table tracks sales per model in the last X hours.

    • If a model sells more than a configurable threshold, its price moves in steps (e.g. +5%).

    • Separate caps for price going up/down (e.g. max +30%, max –20%).

    • Prices are always based on:

      • shared/vehicle.prices.lua (base price per model), and

      • Config.PriceFallbackByClass (min/max per vehicle class).

    • Popular cars get more expensive, dead cars slowly become cheaper – your economy auto-balances itself.

  • Finance system (loans by in-game playtime)

    • Players can buy cars on finance instead of full price.

    • Configurable:

      • Down payment percentage.

      • Finance markup percentage (vehicle more expensive on credit).

      • Min/max number of installments.

      • How often an installment becomes due, based on in-game playtime, not real time.

      • Grace misses before repossession.

      • Early payoff discount and repo behaviour.

    • vehicle_loans table keeps full history of each contract.

    • Optional webhooks for created/paid/repossessed loans.

  • Used car consignment lot

    • One NPC handles listing and managing used cars.

    • vehicle_consignment table stores:

      • Seller identifier & name.

      • Plate, model, price, description, mileage, serviced flag, slot index, state, timestamp.

    • Cars are physically spawned on the configured lot slots, so players walk around an actual used car yard.

    • Per-player listing limit, max description length, commission and payout behaviour are fully configurable.

    • House cut (Config.HouseCut) and payout logic (cash or bank) controlled by config.

    • Hooks and optional payouts_offline table for your own offline payout system.

  • Multi-dealer support

    • Any number of dealerships defined in Config.Dealerships:

      • Unique ID + label.

      • Salesman & key NPC location.

      • Blip details.

      • Preview camera + vehicle spawn.

      • Delivery position.

      • Per-dealer test drive spawn.

      • Showroom slots with model + coords.

      • Key pickup window per dealer and cinematic toggle.

  • Framework & schema autodetect

    • Designed primarily for ESX, but server/utils.lua autodetects:

      • ESX owned_vehicles schema, or

      • QB player_vehicles schema (citizenid + mods JSON).

    • Finance, consignment and repo all work against whichever schema is detected.

    • Config.Framework lets you nudge it ('esx' / 'qb' ).

  • Key systems bridge

    • Unified keys adapter in Config.Keys:

      • wasabi_carlock

      • qs-vehiclekeys

      • Custom export (resource + export name).

    • Used for:

      • Giving keys after purchase.

      • Test drive keys.

      • Removing keys on repo/transfer.

  • Notification bridge & locales

    • One event: 3m:notify + locale keys.

    • Provider options:

      • ox (ox_lib notifications)

      • esx (ESX.ShowNotification)

      • okok (okokNotify)

      • brutal (your own handler slot)

    • Locales:

      • locales/en.lua

      • locales/hr.lua

    • All messages use keys like purchased_ok, not_enough_money, etc., so you can fully translate or rephrase everything.

Requirements

  • FiveM server build 5181+

  • oxmysql

  • ox_lib

  • ox_target

  • ESX (recommended). QB-style schemas are supported, but ESX is the main target.

Optional:

  • okokNotify

  • wasabi_carlock

  • qs-vehiclekeys