# Installation

## 📦 Installation

### 📋 Prerequisites

Before installing Elena Chat, make sure you have:

* ✅ FiveM Server (latest)
* ✅ oxmysql resource
* ✅ MySQL/MariaDB Database

### 🔽 Step 1: Download

After purchasing on Tebex, download the resource from your **Keymaster** or **Tebex account**.

### 📁 Step 2: Extract

Extract the downloaded `elena_chat.zip` to your server's `resources` folder:

```
your-server/
└── resources/
    └── [chat]/
        └── elena_chat/
```

### 🗄️ Step 3: Database

The database table will be **created automatically** on first start.

### ⚙️ Step 4: server.cfg

Add these lines to your `server.cfg`:

```cfg
set resources_useSystemChat false
ensure oxmysql
ensure elena_chat
```

> ⚠️ **Important:** `set resources_useSystemChat false` MUST be added or you'll have two chats!

### 🔐 Step 5: Admin Permissions

Add admin permissions in your `server.cfg`:

```cfg
add_ace group.admin command allow
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
```

### ✅ Step 6: Start Server

Restart your server. You should see:

```
[Elena Chat] chat resource durduruldu.
[Elena Chat] Database tablosu hazır.
```

### 🎉 Done!

Press **T** in-game to open chat. Type `/chatset` to access settings!

> 💬 **Need help?** Join our Discord Support


---

# 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://elena-scripts.gitbook.io/elenascripts/core-systems/chat/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.
