Vehicle Shop

VehicleShop

Complete documentation and presentation for the JJ-VehicleShop.

πŸš— JJ-VehicleShop - Information Page

πŸ“– About the Script

JJ-VehicleShop is a modern FiveM script designed for vehicle sales on ESX servers. The script provides players with a smooth and interactive interface where they can browse, test, and purchase vehicles easily.

Integrated with ox_lib, ox_target, and oxmysql, the system is fast, secure, and fully customizable. It supports multiple languages, modern UI, and complete logging of purchases via Discord webhooks.


🎯 Main Features

  1. Modern UI – Responsive and intuitive interface.
  2. Vehicle Preview – 3D preview of selected vehicles with rotation.
  3. Test Drive – Limited-time test drives with automatic return.
  4. Color Selection – Primary and secondary colors, including custom RGB.
  5. Vehicle Stats – Speed, acceleration, handling, brakes, and capacity.
  6. Filtering and Search – By vehicle class and name.
  7. Platform Support – Compatible with ox_lib, ox_target, oxmysql / mysql-async.
  8. Multi-Language – English, Czech, and easily add more.
  9. Discord Webhooks – Log player purchases.
  10. Automatic Keys – Integration with key systems.

πŸ–₯️ User Interface (UI)

The shop has three main sections:

  • Vehicle List – Quick overview with filtering and search.
  • Preview Area – 3D vehicle display with rotation.
  • Statistics – Dynamic stats for speed, handling, brakes, and capacity.

Shop Preview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸš— JJ-VehicleShop              πŸ’° $50,000    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Vehicles β”‚  [Preview Area]           β”‚Stats   β”‚
β”‚ List     β”‚  [Rotating Vehicle]       β”‚Speed   β”‚
β”‚ πŸ” Searchβ”‚                           β”‚150 km/hβ”‚
β”‚ Class:   β”‚  Selected: Adder          β”‚Brakes  β”‚
β”‚ [All β–Ό]  β”‚  Price: $1,000,000       β”‚Control β”‚
β”‚          β”‚  Payment: [Cash] [Card]  β”‚Capacityβ”‚
β”‚ β€’ Sedan  β”‚                           β”‚        β”‚
β”‚ β€’ SUV    β”‚  [Test Drive] [Buy πŸ›’]    β”‚        β”‚
β”‚ β€’ Sports β”‚                           β”‚        β”‚
β”‚ β€’ Super  β”‚                           β”‚        β”‚
β”‚ β€’ Muscle β”‚                           β”‚        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🚘 Vehicle Categories

  • Sedan – Standard cars for everyday use.
  • SUV – Sport Utility Vehicles, larger and more versatile.
  • Sports – Fast and agile vehicles for racing.
  • Super – High-performance supercars.
  • Muscle – Powerful classic cars.
  • Off-Road – Vehicles for rough terrain.
  • Motorcycles – Bikes and motorbikes.
  • Boats – Watercraft for lakes and seas.
  • Helicopters – Air vehicles for travel and missions.

🎨 Color Options

  • Standard Colors – Quick selection from the GTA color palette.
  • Custom RGB – Precise RGB color selection, fully configurable in the script.

πŸ’³ Payment System

Cash

  • Payment directly from the player's inventory.
  • Immediate transaction.

Card

  • Payment from the player’s bank account.
  • Requires ESX banking system.

Automatic check:

  • If insufficient cash, the card will be used automatically.
  • If insufficient card balance, cash will be used automatically.
  • If neither is sufficient, an error message is shown.

πŸ”‘ Automatic Keys

Upon successful purchase, vehicle keys are automatically assigned:

  • Integration with key systems (configurable).
  • Keys assigned to the vehicle.
  • Vehicle plate used as an identifier.

Configuration:

JJ.UseKeys = true
JJ.GiveKeys = function(source, plate)
    -- Your key system export
end

πŸ›£οΈ Test Drive System

Features:

  • βœ… Limited time (default 60 seconds)
  • βœ… Auto-end when exiting the vehicle
  • βœ… Auto-end when moving too far from the shop (500m)
  • βœ… Countdown timer in UI
  • βœ… Automatic return to the shop after test drive

Settings:

JJ.TestDrive = {
    enabled = true,
    duration = 60000,  -- 60 seconds in milliseconds
    spawnDistance = 5.0,
    returnDistance = 10.0
}

🌍 Multi-Language Support

Supported languages:

  • πŸ‡¬πŸ‡§ English (default)
  • πŸ‡¨πŸ‡Ώ Czech
  • πŸ‡©πŸ‡ͺ German (easily add more)

Change language:

JJ.Locale = 'en'  -- 'en' or 'cs'

βš™οΈ Units (km/h or mph)

You can configure the speed units displayed in the shop:

JJ.SpeedUnit = 'km/h'  -- Options: 'km/h' or 'mph'

πŸ“ Discord Webhooks

Log vehicle purchases via Discord webhooks:

Setup:

JJ.Logs = true
JJ.WebhookPurchase = "https://discord.com/api/webhooks/xxx"

Logged information:

  • Player name
  • Player identifier
  • Vehicle name and model
  • Vehicle plate
  • Price
  • Payment method
  • Date and time

πŸš€ Technical Details

Framework Support

  • βœ… ESX Legacy
  • βœ… ox_lib
  • βœ… ox_target
  • βœ… oxmysql / mysql-async

Database

  • Automatic creation of owned_vehicles table
  • Store vehicles as JSON
  • Plate formatting

Performance

  • Vehicle cache for faster loading
  • Optimized rendering
  • Smooth animations