# Installation

Thank you for choosing **Kartik-MDT** — your ultimate solution for a modern, efficient, and customizable MDT (Mobile Data Terminal) system for your FiveM server.

This guide will walk you through everything you need to know to get Kartik-MDT up and running smoothly. Whether you're a seasoned server developer or just getting started, we've got you covered.

By carefully following each step, you'll ensure a **clean, conflict-free installation** that performs flawlessly and is easy to maintain.

{% hint style="info" %}
**Need Help?**

If you encounter any issues during the installation process, don’t worry — we’ve got your back! Our **dedicated support team** is here to assist you every step of the way.

Simply **open a ticket** on our[ **Discord server**](https://discord.gg/T6AXd2eWdH), and our team will jump in to help you resolve any challenges you might face. We’re committed to ensuring your setup is as smooth as possible, and we’re here to make sure you have the best experience with **Kartik-MDT**.

Feel free to reach out with any questions or concerns — we’re always happy to help!
{% endhint %}

## Download the Asset

#### 🛒 After Purchase: Download Your Scripts

Once you’ve purchased the **Kartik-MDT** script from our store at **Kartik's Scripts Store**, head over to [**Keymaster** ](https://portal.cfx.re/assets/granted-assets)to access your purchased assets.

Here’s how to proceed:

1. Log in to [**Keymaster** ](https://portal.cfx.re/assets/granted-assets)with your account.
2. Locate the **Kartik-MDT** script in your list of acquired assets.
3. Download the following scripts to your server:
   * **Kartik MDT**

With these scripts safely downloaded, you’re ready to move on to the next steps of your installation. Let’s keep things rolling!

## Start the resource

To ensure that **Kartik-MDT** runs smoothly and without any issues on your FiveM server, it’s important to start the scripts in the correct order. This will help everything load properly, preventing any potential problems and making sure the MDT system works as expected.

Follow these steps to start your scripts in the right order:

1. **Start the database wrapper** first. This is necessary for connecting your server to the database:

   ```bash
   ensure oxmysql
   ```
2. **Next, start your core framework** (choose the one that matches your server setup):
   * For **QBCore**:

     ```bash
     ensure qb-core
     ```
   * For **QBX Core**:

     ```bash
     ensure qbx_core
     ```
3. **Start the** **Kartik-MDT** script at last:

   ```bash
   ensure kartik-mdt
   ```

By following this sequence, you’ll ensure that **Kartik-MDT** is set up correctly and everything works seamlessly from the get go.

## Insert the SQL

**🚀 Automatic SQL Import**

With the latest version of **Kartik-MDT**, the SQL file is automatically imported into the connected database when the server starts. You don’t need to manually insert the SQL anymore for the core MDT system to work. The database connection and setup happen automatically.

**📂 Running `criminal_codes.sql`**

However, there’s one important file you need to run **manually** to import the default **criminal codes** into your server. This file is located inside the `[sql]` folder, and it is crucial to run it to ensure the criminal codes are available for use in the MDT system.

Follow these steps:

1. **Navigate to the \[sql] folder** in your **Kartik-MDT** directory.
2. **Locate the `criminal_codes.sql` file**. This file contains all the necessary criminal codes to integrate into your server.
3. **Run the `criminal_codes.sql` file** using your preferred SQL management tool (e.g., phpMyAdmin, HeidiSQL, or MySQL Workbench) to import the criminal codes into your database.

{% hint style="warning" %}
**Important**: This step is essential as it ensures that the criminal codes are available for use within your MDT system, making sure everything functions as expected.
{% endhint %}

By following these steps, your database will be properly configured and ready to support the full functionality of **Kartik-MDT**.

## 🚀 Start Your Server

Now, start your server and enjoy **Kartik-MDT**! You can also customize the script to fit your needs. For configuration details, head to the **configuration section**.
