Installation
Thank you for choosing Kartik-Mechanic, the complete, realistic vehicle simulation system for FiveM.
This guide walks you through the installation, boot order, and initial configuration required to launch Kartik-Mechanic on your server.
Need Help? If you run into any issues during installation, please open a ticket on our Discord server. Our support team is ready to assist you!
๐ Dependencies
Ensure these resources are installed and running before starting Kartik-Mechanic:
| Dependency | Required | Purpose |
|---|---|---|
| oxmysql | โ Yes | Core database wrapper. |
| ox_lib | โ Yes | UI, notifications, and shared utilities. |
| Framework | โ Yes | QBox, QBCore, or ESX (Legacy/1.2+). |
| kartik-mechanic-stream | โ Yes | Mandatory 3D models and sound assets. |
๐ฅ Asset Setup
- Log in to Cfx.re Keymaster.
- Find Kartik-Mechanic in your granted assets.
- Download the latest version and extract it into your server's
resourcesfolder. - Important: Ensure you also download and install
kartik-mechanic-streamalongside it.
๐ฆ Boot Order (server.cfg)
The order in which resources start is critical. If Kartik-Mechanic starts before its dependencies, it will fail to load its bridge functions.
# 1. Core Utilities
ensure oxmysql
ensure ox_lib
# 2. Framework (Choose one)
ensure qb-core
# ensure qbx_core
# ensure es_extended
# 3. Inventory System
ensure ox_inventory
# 4. Kartik Mechanic Assets
ensure kartik-mechanic-stream
ensure kartik-mechanic๐ ๏ธ Initial Configuration
- Items: Kartik-Mechanic requires a wide range of items for parts and tools.
- Copy the item definitions from Configuration > Items into your inventory's data file.
- Database: Kartik-Mechanic is a drag-and-drop script and does not include a separate
.sqlfile. The script features an auto-installer that handles database setup automatically on the first launch.- Crucial: Before starting the script for the first time, ensure your database does not already contain tables starting with
mechanic_,vehicle_mileage, orhandling_. - Ensure your MySQL user has
CREATEpermissions.
- Crucial: Before starting the script for the first time, ensure your database does not already contain tables starting with
- Bridges: Head to
shared/general.luaand ensureConfig.InteractionTypematches your server's preference (radial,button, ortarget).
โก Performance Tuning
If you notice performance issues on high-population servers, consider adjusting these values in shared/general.lua:
Config.AutosaveInterval: Increase to60or120seconds to reduce database load.Config.BrakeGlow.UpdateInterval: Increase to100or200ms for a more lightweight visual effect.Config.WarningsInterval: Set to a high value (9999) to prevent repeated client-side calculations for worn parts.
โ Common Issues
[!WARNING] "Resource kartik-mechanic-stream not found" This script depends on its stream folder to load 3D models (clips, dynos, lifts). Ensure the stream resource is named exactly
kartik-mechanic-streamand is started before the main script.
[!NOTE] "Attempt to call a nil value (export '...')" This usually means a dependency (like
ox_lib) started after Kartik-Mechanic. Check yourserver.cfgboot order carefully.