> For the complete documentation index, see [llms.txt](https://docs.vames-store.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vames-store.com/assets/vms_reports/installation.md).

# 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. Install Required Dependencies

This script needs a few extra resources to work properly.\
Below you will find a list of things to download - click the link, download and upload to your server just like other resources.

<table data-full-width="false"><thead><tr><th width="378.27276611328125">Resource</th><th data-type="content-ref">Download Link</th></tr></thead><tbody><tr><td><strong>screenshot-basic</strong> - it's required for screenshots</td><td><a href="https://github.com/citizenfx/screenshot-basic">https://github.com/citizenfx/screenshot-basic</a></td></tr></tbody></table>

***

## 3. Import Database Tables

This is a very important step - without it, the script will not work properly.\
**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</summary>

```sql
CREATE TABLE IF NOT EXISTS `reports` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner` mediumtext DEFAULT NULL,
  `type` varchar(75) DEFAULT NULL,
  `title` mediumtext DEFAULT NULL,
  `description` longtext DEFAULT NULL,
  `chat` longtext NOT NULL DEFAULT '{}',
  `screenshot` longtext DEFAULT NULL,
  `claimed` int(1) DEFAULT 0,
  `claimedBy` longtext DEFAULT NULL,
  `closed` int(1) DEFAULT 0,
  `closedBy` longtext DEFAULT NULL,
  `createdTime` varchar(50) DEFAULT NULL,
  `closedTime` varchar(50) DEFAULT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE IF NOT EXISTS `reports_statistics` (
  `identifier` varchar(50) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `claimed` int(10) DEFAULT 0,
  `closed` int(10) DEFAULT 0,
  `sentmessages` int(10) DEFAULT 0,
  `resolved_reports` int(10) DEFAULT 0,
  UNIQUE KEY `identifier` (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
```

</details>

***

## 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 screenshot-basic
start [core] # For example, here is your framework (esx/qb-core)

# VMS Resources
start vms_reports
```

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