[PAID][ESX][QBCore] Used Car Dealership

Ello Luvs, I bring to you my used car dealership script on this lovely Monday.

Video Preview - The video is a bit old, so don’t worry about the prints.
Tebex Link

Before we begin, if you’re not feeling it, there IS A FREE ALTERNATIVE from a few years back, I believe it was made by qalle? You can find it here on the forums. But anyway, enough of a PSA.

Lets get to it!

  • All cars bought/sold retain ALL OF THEIR MODS, their license plates, etc.

  • Create RP by allowing players to sell their cars (Not to an rp-less void of a circle which just gives them a designated % of the cars value back)

  • Bring your car to the used car dealership (You can change the location with ease, code is not obfuscated or encrypted).

  • Talk to the NPC to list your car (The NPC will confirm with you the plate, and then you choose the price)

  • Once you choose a price (whole numbers, no commas) your car will then be removed from your ownership (e.g removed from your owned_vehicles table) and stored in another readily available to be purchased.
    – Anyone can now walk up and “Inspect” your car, getting a few values from the car like est. max speed and suspension level.
    – By default, it supports 10 Car Positions but you can add as many as you can fit.
    – Once a vehicle is purchased (Depending on your garage system) it will either be located in your Impound or your default Garage.

  • When your vehicle is purchased, you can then talk to the NPC again and select “Collect Money” to get your money.
    – This allows your car to be sold even while offline, so all you have to do is drive your car, list it, and reap the benefits!

That… is pretty much it. The goal of this script was to recirculate cars and make people think more about their purchases so they cannot just auto-return cars they made on impulse buys.

The script requires ESX; Tested on Legacy but should work on -any-
swt_notifications - GitHub - Switty6/swt_notifications (Or you can change it to your notification of choice)
PolyZone - GitHub - mkafrin/PolyZone: PolyZone is a FiveM mod to define zones of different shapes and test whether a point is inside or outside of the zone
bt-target - GitHub - brentN5/bt-target
nh-contextmenu - GitHub - nerohiro/nh-context: Simple, minimalistic event firing context menu
nh-keyboard
^ Provided in the ZIP for the Script (Uses an older version of nh-context & nh-keyboard)

Please ensure your bt-target (or whatever target you use) has THIS export

function AddEntityZone(name, entity, options, targetoptions)
Zones[name] = EntityZone:Create(entity, options)
Zones[name].targetoptions = targetoptions
end

exports(“AddEntityZone”, AddEntityZone)

^ The " need to be quotes or ’

MAKE SURE YOU ADD THE SQL, you’ll also have to add a new ROW to your users table called “carsales”, no default value int(10)

Some of my other scripts: Oxy/Deliveries 1 | Taco Job 1 | Meth Making 1 | Mechanic Job | BMX Comp Standalone 2 | Fitness, Group Yoga & More 1 | More Interactive Stores | Burgershot | Prison+ 1 | Underwater Salvage Job | Jewelry Store | Chop Shop 2 | The Best Trading Cards Script To Date 1 | Cluckin Bell | Chicken Job | Chicken Fighting 1 | Armored Truck Heist 1 | Baseball (Standalone) | Pizza Delivery | Crypto Currency | Garbage Collector

2 Likes

[Release] esx-qalle-sellvehicles (sell used cars) This seems very similar to this?

At the very top of my post, I stated as such that there was a free Alternative (What you linked is exactly what I was referring to) However mine is more modern and updated, and uses a target system, bt-target in this case, as well as a few other features/quality of life changes

Right at the top " Before we begin, if you’re not feeling it, there IS A FREE ALTERNATIVE from a few years back, I believe it was made by qalle? You can find it here on the forums. But anyway, enough of a PSA."

Hey is it possible to set specific models to be blacklisted from the dealership? Let’s say VIP cars that shouldn’t be resold for example?

Not at the moment, but it is definitely something I could build into the script.

1 Like

QB Core Version is now finished! Download is including in the Link you receive from Tebex :slight_smile:


Please update QB Core. This is my mistake ,I am using the latest core

Is there an updated version using new resources?

Can it be changed to ox_ Target?

How would you install it on QBCore?