# Tuning Creator

{% embed url="<https://www.youtube.com/watch?v=GEpxrm4aLkA>" %}

## 📖 Overview

**m-TuningCreator** is a complete vehicle customization system designed for FiveM roleplay servers. It gives server owners a powerful, zone-based tuning platform with a modern in-game UI where players can fully customize their vehicles, from performance upgrades to paint jobs, wheels, neon lights, stance adjustments, and more. Mechanics can manage tuning orders, earn commissions, and operate professional workshops. Server admins can create and configure unlimited tuning zones entirely in-game, with no restarts needed.

***

## ✨ Key Features

### 🔧 Vehicle Customization

Full modification system covering every aspect of vehicle tuning:

* Performance upgrades: Engine, Brakes, Transmission, Suspension, Armor, and Turbo toggle
* 30+ cosmetic part categories: Spoiler, Front Bumper, Rear Bumper, Side Skirts, Exhaust, Roll Cage, Grille, Hood, Fenders, Roof, Seats, Steering Wheel, and many more
* Paint system with Classic, Matte, Metal, and Chrome color palettes, plus full custom RGB support for primary and secondary colors
* 13 wheel types: Sport, Muscle, Lowrider, SUV, Offroad, Tuner, Bike, High End, Benny's Original, Benny's Bespoke, Open Wheel, Street, and Track
* Neon lights with position and color customization
* Xenon headlights with color selection
* Window tint with multiple levels
* Tyre smoke with custom colors
* License plate style and text editing (configurable)
* Horn selection from all available horn types
* Extras toggle and livery application
* Bulletproof tires toggle
* Wheel color, pearlescent, interior color, and dashboard color

### 🏗️ Stance System

Full vehicle stance adjustment system (configurable via `Config.AllowStance`):

* Ride height adjustment
* Front and rear camber control
* Individual wheel offset for all four wheels
* Stance data saved per vehicle plate in the database
* Stance persists across sessions and server restarts

### 🏪 Zone System

Create and manage unlimited tuning zones across the map, all configurable in-game:

* Custom zone name, position, and radius
* Configurable map blip: sprite, color, scale, and enable/disable
* Job restrictions to lock zones to specific jobs
* Vehicle blacklist and whitelist per zone
* Player identifier whitelist for private zones
* Free jobs, allow certain jobs to tune for free
* Individual pricing per zone for every mod category
* Enable or disable zones without deleting them
* Zones are stored in the database and sync automatically to all clients

### 🔩 Mechanic & Society System

Built-in mechanic workflow with society fund integration:

* Society pay: tuning income goes directly to the job's society funds
* Mechanic commission: configurable percentage of each transaction goes to the mechanic as personal income
* Vehicle repair command restricted to jobs associated with tuning zones
* Vehicle stats command for quick diagnostic information
* Compatible with `qb-banking`, `Renewed-Banking`, `fd-banking`, `RxBanking`, `tgg-banking`, `wasabi-banking`, and `esx_addonaccount`

### 📋 Pending Orders System

Full order queue system for mechanic workshops:

* Players submit tuning orders specifying the mods they want
* Orders are queued per zone and visible to mechanics with the right job
* Mechanics can review, apply, or cancel pending orders
* Each order tracks: player name, vehicle model, vehicle label, plate, mods requested, total cost, and creation date
* Order status management: pending, completed, or cancelled
* Discord webhook logging for order lifecycle events

### 🎯 Item Requirements

Flexible item requirement system for immersive roleplay:

* Require specific inventory items per mod category (e.g., `spray_can` for colors, `wheel_kit` for wheels, `neon_kit` for neon)
* Require items per individual performance or cosmetic mod entry
* Players need both the item and the money to apply modifications
* Items are consumed on successful application
* Fully optional, set any category to `nil` for money-only tuning

### 💰 Payment System

Intelligent payment handling with multi-source support:

* Seven banking system integrations plus custom bridge support
* Society fund deposits with configurable mechanic commission split
* Free tuning support for whitelisted jobs

### ⚙️ Admin Panel

Complete in-game zone management without server restarts:

* Create, edit, duplicate, and delete tuning zones
* Raycast positioning: pick zone and pending target coordinates by pointing at the ground
* Configure all zone settings live: name, radius, blip, jobs, prices, blacklist, whitelist, identifiers, society pay, commission, and pending target
* Manage pending order pickup points with job restrictions
* Permission system based on player identifiers (`steam`, `license`, `fivem` and `citizenid)`

### 📡 Discord Webhooks

Automatic Discord logging for server administration:

* Tuning logs: every vehicle modification and repair transaction with player details, cost, and zone
* Pending logs: order creation, application, and cancellation events
* Admin logs: zone creation, updates, deletion, and duplication actions
* Each log is timestamped and formatted with Discord embeds

### 🌐 Bridge System

Fully abstracted framework detection with automatic setup:

* Framework support: ESX, QBCore, and QBox
* Target system: `ox_target` and `qb-target` auto-detected, with custom bridge fallback
* Inventory system: `ox_inventory` and `qb-inventory` auto-detected, with custom bridge fallback
* Banking system: seven systems auto-detected, with custom bridge fallback
* Console prints on startup showing exactly what was detected (framework, vehicles table, banking, inventory, target)
* Custom bridge files for banking, inventory, and target, server owners can integrate any unsupported system by editing the `custom.lua` files


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mscripts.gitbook.io/docs/both-framework/scripts/tuning-creator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
