# Installation

## 1. Download Resource

Download the purchased resource from [**CFX Portal**](https://portal.cfx.re/assets/granted-assets) - the official site of FiveM with purchased resources.

***

## 2. Import Database Tables

This is a very important step - without it, the script will not work properly.\
Depending on the framework you are using (ESX or QB-Core), select the appropriate section below and **paste the SQL code into your database**.

{% hint style="warning" %}

## Not sure how to do it?

No worries - we've prepared a short guide that shows you step by step how to import an SQL file into your database:\
👉 [**Click here to view the tutorial.**](/helpful/basic-server-knowledge/how-to-import-sql-to-database.md)
{% endhint %}

<details>

<summary>Database for ESX</summary>

```sql
ALTER TABLE `users` ADD COLUMN `badge` longtext DEFAULT '[]';

CREATE TABLE IF NOT EXISTS `bossmenu` (
	`job` varchar(100) NOT NULL,
	`account_name` varchar(50) DEFAULT NULL,
	`type` varchar(50) DEFAULT 'job',
	`balance` int(15) DEFAULT 0,
	`data` longtext DEFAULT '[]',
	`announcements` longtext DEFAULT '[]',
	PRIMARY KEY (`job`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `bossmenu_outfits` (
	`id` int(11) NOT NULL AUTO_INCREMENT,
	`job` varchar(50) DEFAULT NULL,
	`grades` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
	`name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
	`gender` tinyint(4) DEFAULT NULL,
	`outfit` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
	PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `bossmenu_permissions` (
	`job` varchar(50) DEFAULT NULL,
	`grade` int(11) DEFAULT NULL,
	`permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `bossmenu_transactions` (
	`id` int(11) NOT NULL AUTO_INCREMENT,
	`name` varchar(80) DEFAULT NULL,
	`executor` varchar(100) DEFAULT NULL,
	`executor_identifier` varchar(100) DEFAULT NULL,
	`type` varchar(50) DEFAULT NULL,
	`amount` int(11) DEFAULT NULL,
	`title` longtext DEFAULT NULL,
	`date` int(11) DEFAULT NULL,
	PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
```

</details>

<details>

<summary>Database for QB-Core</summary>

```sql
ALTER TABLE `players` ADD COLUMN `badge` longtext DEFAULT '[]';

CREATE TABLE IF NOT EXISTS `bossmenu` (
	`job` varchar(100) NOT NULL,
	`account_name` varchar(50) DEFAULT NULL,
	`type` varchar(50) DEFAULT 'job',
	`balance` int(15) DEFAULT 0,
	`data` longtext DEFAULT '[]',
	`announcements` longtext DEFAULT '[]',
	PRIMARY KEY (`job`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `bossmenu_outfits` (
	`id` int(11) NOT NULL AUTO_INCREMENT,
	`job` varchar(50) DEFAULT NULL,
	`grades` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
	`name` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
	`gender` tinyint(4) DEFAULT NULL,
	`outfit` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
	PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `bossmenu_permissions` (
	`job` varchar(50) DEFAULT NULL,
	`grade` int(11) DEFAULT NULL,
	`permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `bossmenu_transactions` (
	`id` int(11) NOT NULL AUTO_INCREMENT,
	`name` varchar(80) DEFAULT NULL,
	`executor` varchar(100) DEFAULT NULL,
	`executor_identifier` varchar(100) DEFAULT NULL,
	`type` varchar(50) DEFAULT NULL,
	`amount` int(11) DEFAULT NULL,
	`title` longtext DEFAULT NULL,
	`date` int(11) DEFAULT NULL,
	PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
```

</details>

***

## 3. Environment Requirements

{% stepper %}
{% step %}

### Remove Old Management Systems

Remove **esx\_society** / **qb-management** from your server.
{% endstep %}

{% step %}

### Integrate paychecks

Go to section [Paychecks Integration](/assets/vms_bossmenu/guides/paychecks-integration.md) and make changes to your framework.
{% endstep %}
{% endstepper %}

***

## 4. Start Resource

To start a resource in your `server.cfg`, ensure that it begins after your framework has been initiated. For instance, if you are using a framework like `es_extended`, you should start resource after it, like so:

```python
start [core] # For example, here is your framework (esx/qb-core)

# Here you run your other resources like esx_policejob etc.

# VMS Resources
start vms_bossmenu # start vms_bossmenu as last resource in your server.cfg
```

Ensure there are no syntax errors or incorrect paths in your `server.cfg`.


---

# 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://docs.vames-store.com/assets/vms_bossmenu/installation.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.
