# Installation

Quasar Spooky Missions transforms your FiveM server into a Halloween event with immersive tasks, haunted props, and eerie effects. Players complete missions guided by a mysterious NPC to earn exclusive seasonal rewards like costumes and collectibles. Fully customizable and compatible with ESX, QBCORE or standalone, it adds festive atmosphere, replayability, and community engagement. &#x20;

***

## Download Script

To download the assets needed for this script, you must access the official Cfx.re portal, where all assets purchased through Tebex are managed.

1. Go to the following link:\
   🔗 <https://portal.cfx.re/assets/granted-assets>
2. Log in with the same Cfx.re account you used to make the purchase.
3. In the list of granted assets, find and download the following:
   * &#x20;  `Spooky Missions`   &#x20;

***

## Download Dependencies

This script requires some mandatory dependencies to function correctly.\
Make sure to download and extract them inside your server’s main directory, keeping their original folder structure intact.

{% embed url="<https://github.com/overextended/oxmysql/releases>" %}

***

## Server.cfg Placement

This script must always start after `es_extended` or `qb-core`, never before.\
We recommend placing it below in your `server.cfg`, ensuring that all its dependencies are started first to prevent errors or unexpected behavior.

***

## Database Setup

{% hint style="warning" %}
Avoid using tools like XAMPP or other non-optimized local servers, as they may cause connection errors.
{% endhint %}

This script includes an essential database required for its operation.\
You must import it before starting your server, preferably using HeidiSQL or any other manager compatible with MariaDB/MySQL.

<details>

<summary>DATABASE ESX/QBCORE</summary>

```sql
CREATE TABLE `qs-halloween_objects` (
  `id` int(11) NOT NULL,
  `model` varchar(50) NOT NULL,
  `position` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`position`)),
  `placed` date NOT NULL DEFAULT current_timestamp(),
  `player` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

ALTER TABLE `qs-halloween_objects`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `qs-halloween_objects`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

CREATE TABLE `qs-halloween_rewards` (
  `id` int(11) NOT NULL,
  `identifier` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

ALTER TABLE `qs-halloween_rewards`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `qs-halloween_rewards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

```

</details>
