Skip to content

10% off shop orders, applied at checkoutBlack Friday: 30% off until Dec 1Server templatesServer templates

RPScripts

FiveM Vehicle Scripts

Vehicle Shop Script (QBCore/ESX) FiveM preview

S4 Vehicle Shop (ESX)

Frameworks:
  • ESX

Checked by the RPScripts Lab

  • Static check: 1 resource read
What was checked
Check compatibility with your server

Details

Frameworks
ESX
Dependencies
ghmattimysql
File size
1.3 MB
Updated
Licence and support terms
  • Licence: for your own server or project. No resale or sharing.
  • Updates: when a newer file is available, it appears in your account downloads.
  • Support: download access and product-specific setup questions.
Licence and support terms

Description

This is a vehicle dealership for ESX servers. Players walk up to a shop marker, browse vehicles in a NUI showroom with a live preview, pick a colour, test drive and buy. You define the vehicle list, prices and shops in the config.

Features

  • NUI dealership menu (ui/ui.html) with a showroom camera, a spawned preview car that players can rotate, and icons for consumption, tank, trunk and upgrades
  • Colour selection before buying: preset colours and a colour picker, applied as the primary and secondary colour of the delivered car
  • Vehicle categories in config.lua (modlu, motorcycles, muscle, sports, super, suvs), each entry with label, spawn name and price
  • Shops in Config.Shops with map blip, interaction point, camera, preview spawn and delivery point; each shop can be limited to a job, accept blackmoney and enable or disable the test drive
  • Test drive with a configurable duration (Config.TestDrive)
  • Configurable trunk capacity for cars and vans (Config.TrunkCapacity, Config.TrunkVanCapacity)
  • Payment with the cash or blackmoney item; the bought car is saved to owned_vehicles and a carkey item is added
  • Client export GeneratePlate, which returns a random plate in the format ABC 123 that is not yet in owned_vehicles

Requirements

  • ESX with the esx:getSharedObject event; the code uses no QBCore or Qbox functions
  • ghmattimysql and an ESX owned_vehicles table
  • An inventory that provides the cash, blackmoney and carkey items
  • The vehicle models in the config must exist on your server; the default list includes addon spawn names such as zl12017 and trhawk

Installation

  1. Copy the s4-vehicleshop folder into your resources directory.
  2. Add ensure s4-vehicleshop to your server.cfg.
  3. Edit the vehicle list, prices and shop locations in config.lua. The menu text is Turkish by default and is edited in ui/ui.html.

Server setup

Step-by-step guide: how to install a FiveM script

Checked: the only resource of this download.

In your downloads
  • JG Dealerships
    • ESX
    • QBCore, Qbox
    Not for your framework

    JG Dealerships

    JG Scripts

    $30.00$21.00
  • Car Radio
    • ESX
    • QBCore, vRP
    Not for your framework

    Car Music System V3 [Standalone]

    $14.99$10.49
  • Simple ESX HUD FiveM resource preview
    • ESX
    • Standalone, QBCore, Qbox

    Airbags Script

    Big Daddy

    $9.00$6.30
  • mCarControl
    • ESX
    • QBCore
    Not for your framework

    CodeM mCarControl

    CodeM

    $5.00$3.50
  • Contract ESX
    • ESX
    Not for your framework

    okokContract

    okok Scripts

    $13.99$9.79
  • Quasar Vehiclekeys 2.0 FiveM resource preview 2
    • ESX
    • Standalone, QBCore, Qbox

    Quasar Vehiclekeys

    Quasar Scripts

    $10.00$7.00
  • CodeM mVehicleshop v2 FiveM resource preview
    • ESX
    • QBCore, Qbox
    Not for your framework

    CodeM mVehicleshop v2

    CodeM

    $15.00$10.50
  • Smart Motorways
    • ESX
    • QBCore, Qbox, vRP
    Not for your framework

    London Studios Smart Motorways

    London Studios

    $30.00$21.00