# Installation

## 📦 Installation

### Dependencies

#### Required

| Dependency | Link                                              |
| ---------- | ------------------------------------------------- |
| oxmysql    | [GitHub](https://github.com/overextended/oxmysql) |

#### Framework (choose one)

| Framework          | Link                                                  |
| ------------------ | ----------------------------------------------------- |
| es\_extended (ESX) | [GitHub](https://github.com/esx-framework/esx-legacy) |
| qb-core (QBCore)   | [GitHub](https://github.com/qbcore-framework/qb-core) |

#### Inventory (choose one)

| Inventory     | Config Value |
| ------------- | ------------ |
| ox\_inventory | `'ox'`       |
| qb-inventory  | `'qb'`       |
| qs-inventory  | `'qs'`       |
| lj-inventory  | `'lj'`       |
| ESX default   | `'esx'`      |

#### Optional

| Resource       | Used For                    |
| -------------- | --------------------------- |
| ox\_lib        | Notifications & Progressbar |
| ox\_target     | Target system               |
| qb-target      | Target system               |
| qb-progressbar | Progressbar                 |

***

### Step 1: Database

Run `install.sql` in your database, **or** simply start the resource — tables are created automatically with auto-migration.

```sql
-- install.sql is included in the resource
-- Tables: craft_players, craft_logs
```

### Step 2: Files

Copy the `elenacraft` folder to your server's `resources/` directory:

```
resources/
└── elenacraft/
    ├── fxmanifest.lua
    ├── install.sql
    ├── config/
    ├── shared/
    ├── client/
    ├── server/
    └── html/
```

### Step 3: server.cfg

Add to your `server.cfg` in the correct order:

```
ensure oxmysql
ensure es_extended    # or qb-core
ensure ox_inventory   # or your inventory
ensure ox_lib         # optional
ensure ox_target      # optional
ensure elenacraft
```

\
**Important:** elenacraft must start AFTER your framework and inventory resources.\ <br>

### Step 4: Configure

Edit `config/general.lua` to match your server setup:

```
Config.Framework   = 'qb'       -- 'esx' or 'qb'
Config.Inventory   = 'ox'       -- 'esx' | 'qb' | 'ox' | 'qs' | 'lj'
Config.Notify      = 'ox_lib'   -- 'esx' | 'qb' | 'ox_lib'
Config.Progressbar = 'default'  -- 'default' | 'ox_lib' | 'qb'
Config.Target      = false      -- false | 'ox' | 'qb'
Config.Locale      = 'en'       -- 'tr' | 'en' | 'de'
```

### Step 5: Register Items

All items used in recipes must be registered in your inventory system. See Items & Jobs Setup for complete item lists.

### Step 6: Restart

Restart your server or use:

```
ensure elenacraft
```

\
**Done!** Visit the craft table coordinates to start crafting. Default locations are in `config/tables.lua`.<br>


---

# 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/gameplay/craft-system/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.
