AI Core

ai-vehiclesales

Used car lots where players sell their vehicles to each other, with test drives and a dealer buy-back.

ai-vehiclesales runs used car lots. A player drives an owned vehicle onto the lot, sets a price, and the car is parked there for everyone to see. Other players browse, take a timed test drive and buy. The seller is paid even when offline.

What it does in the game

  • Selling. Drive your own vehicle onto the lot's sell spot, alone, and press the interact key at Put your vehicle up for sale. Set a price (between the panel's lowest and highest price) and an optional description, and confirm. Your keys for that plate are taken. The vehicle keeps its plate, look and trunk: it is the same vehicle, held by the lot.
  • Dealer buy-back. If the vehicle is in ai-vehicleshop's catalog, the sell spot first offers a menu: List it for sale, or Sell to the dealer for $... (a share of the catalog price, paid at once; the vehicle is deleted for good).
  • The lot. Listed vehicles stand on the lot's parking spots, first listed first parked. They are locked and cannot be driven, pushed or damaged. Listings beyond the number of spots are still for sale on the counter's list.
  • Browsing. At the counter, Browse ... opens a showroom screen: every listing with its price, seller, plate, how long ago it was listed and the seller's description. Search by name or plate, sort by newest, cheapest or priciest, or show only My listings.
  • Test drive. A temporary copy of the vehicle appears at the delivery spot with you in the driver seat. A timer counts down; getting out ends it early. At the end the copy is deleted and you are back at the counter. One character waits a cooldown between drives.
  • Buying. Buy takes the price from the first account that can pay. The vehicle becomes yours and waits at the delivery spot. If it cannot be brought out, it goes to the impound (pick it up at an ai-garages impound lot).
  • Getting paid. The seller receives the price minus the lot's cut, right away when online, or at their next login. If a phone script runs, the seller also gets a mail.
  • Taking back. On the screen, Take back returns your own listing to you at the delivery spot.

Installation

Installed by the AI Core recipe. By hand: ensure ai-vehiclesales after ai-core and ai-vehicles (and ai-vehicleshop for the dealer buy-back). The tables ai_vehiclesales_listings and ai_vehiclesales_payouts are created on the first start. One lot comes ready: Larry's Vehicle Sales in Sandy Shores, with 25 parking spots.

Panel settings

Admin panel > Used car lots.

Tab: Lots

Where players sell their vehicles to each other. One record per lot (New lot / Delete lot). Deleting a lot keeps its listings stored; they show again when a lot with the same key exists.

Lot card: the counter players browse from, where they drive in to sell and how far the parked cars show.

SettingWhat it changesUnitDefault for new
Lot nameShown on the prompt and the screen. 1-48 characters.
CounterStand where players open the list of vehicles for sale and use your position.point
Counter reachHow far from the counter the prompt shows. 1-10.m2
Lot sizeMetres around the counter. Parked cars show to players inside, and buyers must be inside to buy or test drive. 20-300.m80
Sell spotWhere players drive in with the vehicle they want to sell.point
Map blipShows this lot on the map with the look from the Settings tab.on / offon

Parking spots card: where listed vehicles stand on the lot, first listed first parked. More listings than spots are still for sale on the counter's list.

SettingWhat it changes
SpotsA list of positions with heading (Add spot), up to 100.

Preview and delivery card: where the vehicle a player looks at stands, where the camera looks from and where bought, taken back and test drive vehicles come out.

SettingWhat it changes
Preview spotStand where the shown vehicle should be, facing its front direction.
CameraLook at the preview spot with the game camera and use the camera position.
Delivery spotA free place on the road, facing the way out. It may be the preview spot.

NPC card: an optional person at the counter (Model, What it does, Where it stands). Leave the model empty for none.

Tab: Settings

Prices, the lot's cut, payment and test drives.

Sales: what sellers may ask and how much the lot keeps.

SettingWhat it changesUnitDefault
Lot's cutPart of the price that stays with the lot; the seller gets the rest. 0-90.%10
Lot's cut goes toNobody, A job or A gang. A job's or gang's shared account receives the cut of every sale. Nobody: the money leaves the economy.Nobody
JobThe job that gets the cut. Shown when "A job" is picked.empty
GangThe gang that gets the cut. Shown when "A gang" is picked.empty
Into its accountThe job's or gang's shared account the cut is paid into.bank
Lowest priceThe lowest price a seller may ask. 1-100,000,000. Must not be above the highest price.$1,000
Highest priceThe highest price a seller may ask. 1-100,000,000.$10,000,000
Listings per characterHow many vehicles one character may have for sale at once, over every lot. 1-50.3

Dealer buy-back: at the sell spot a player may also sell an owned vehicle straight to the lot. The vehicle is deleted and the player paid at once.

SettingWhat it changesUnitDefault
Dealer paysPart of the vehicle shop's catalog price paid into the seller's account. 0 turns the dealer off; vehicles missing from the catalog are never bought. 0-100.%50

Payment: where buyers pay from and where sellers are paid.

SettingWhat it changesDefault
Buyer pays fromTried in this order until one has enough money.bank, cash
Seller is paid intoPaid when the vehicle sells, or at the seller's next login when offline. Dealer buy-backs are paid here too.bank

Test drives: a temporary copy of a listed vehicle the buyer may drive before paying.

SettingWhat it changesUnitDefault
LengthHow long a test drive lasts. 10-600.s60
Wait between drivesSeconds one character waits before the next test drive (0 = none). 0-3600.s60

Map blip: how lots with the map blip switched on look on the map.

SettingWhat it changesDefault
LotBlip icon, color and size.icon 326, color 3, size 0.75

Commands and keybinds

None. The prompts use the interact key (E by default). ESC closes the screen.

Logs

Two log channels: listings (a vehicle listed or taken back) and sales (sales, dealer buy-backs, payouts received at login, and a lot's cut that could not be paid).

Known limits

  • Only owned vehicles of your own character can be sold (not job or gang fleet vehicles, not rentals).
  • Listing saves the vehicle's damage and fuel, but never its tuning: the stored look stays as it was.
  • The dealer's money comes from nowhere (as in QB): it is new money in the economy. Set Dealer pays to 0 to turn it off.
  • There is no paper contract between two players: sales go only through a lot.

On this page