Kartik Scripts

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:

DependencyRequiredPurpose
oxmysqlโœ… YesCore database wrapper.
ox_libโœ… YesUI, notifications, and shared utilities.
Frameworkโœ… YesQBox, QBCore, or ESX (Legacy/1.2+).
kartik-mechanic-streamโœ… YesMandatory 3D models and sound assets.

๐Ÿ“ฅ Asset Setup

  1. Log in to Cfx.re Keymaster.
  2. Find Kartik-Mechanic in your granted assets.
  3. Download the latest version and extract it into your server's resources folder.
  4. Important: Ensure you also download and install kartik-mechanic-stream alongside 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

  1. Items: Kartik-Mechanic requires a wide range of items for parts and tools.
  2. Database: Kartik-Mechanic is a drag-and-drop script and does not include a separate .sql file. 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, or handling_.
    • Ensure your MySQL user has CREATE permissions.
  3. Bridges: Head to shared/general.lua and ensure Config.InteractionType matches your server's preference (radial, button, or target).

โšก Performance Tuning

If you notice performance issues on high-population servers, consider adjusting these values in shared/general.lua:

  • Config.AutosaveInterval: Increase to 60 or 120 seconds to reduce database load.
  • Config.BrakeGlow.UpdateInterval: Increase to 100 or 200ms 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-stream and 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 your server.cfg boot order carefully.

On this page