> For the complete documentation index, see [llms.txt](https://rambo3dev.gitbook.io/rambo3dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rambo3dev.gitbook.io/rambo3dev/rambo3dev-shops-creator/shops-creator-overview/installation-esx-and-qb-core.md).

# Installation ESX & QB-Core

**Complete setup guide for ESX and QBCore frameworks**

***

### 📋 Pre-Installation Checklist

Before installing the Rambo3Dev Shops Creator, ensure you have:

| Requirement                               | Status                           | Notes                                |
| ----------------------------------------- | -------------------------------- | ------------------------------------ |
| ✅ **ESX Legacy** or **QBCore**            | ⬜                                | Choose your framework                |
| ✅ **HeidiSQL**                            | ⬜                                | Recommended database management tool |
| ✅ **oxmysql** Resource                    | ⬜                                | Latest version recommended           |
| ✅ **ox\_inventory + ox\_lib** (ESX)       | ⬜                                | Required for ESX item fetching       |
| ✅ **qb-inventory** (QBCore)               | ⬜                                | Required for QBCore item fetching    |
| ✅ **Server Artifacts Latest Recommended** | ![](/files/7PcOYUHtIlMBBOwXABLh) | FiveM server version                 |
| ✅ **Admin Permissions**                   | GOD , Admin                      | ACE permissions setup                |

***

### 📦 Installation Steps

#### Step 1: Download & Extract

1. **Download** the script from your Tebex purchase
2. **Extract** the `rambodev-store-creator` folder
3. **Place** it in your server's `resources` folder

```
📁 resources/
└── 📁 [scripts]/
    └── 📁 rambodev-store-creator/
        ├── 📄 fxmanifest.lua
        ├── 📄 config.lua
        ├── 📁 client/
        ├── 📁 server/
        ├── 📁 html/
        └── 📄 shops.sql
```

#### Step 2: Database Setup

1. **Open HeidiSQL** and connect to your MySQL/MariaDB server
2. **Select your database** (usually your server's database)
3. **Import the SQL file**:
   * Go to **File > Load SQL file**
   * Select `rambodev-store-creator/shops.sql`
   * Click **Execute** (F9)
4. **Verify** the table was created:
   * Refresh your database
   * Check for `rambodev_shops` table
   * Verify table structure shows all required columns

#### Step 3: Framework Configuration

Choose your framework and follow the appropriate configuration:

***

### 🟢 ESX Framework Setup

#### Configuration Files

**📄 config.lua**

```lua
-- Framework Selection
Config.Framework = "esx"  -- Set to "esx"

-- ESX Specific Settings
Config.ESX = {
    -- These settings are automatically handled
    -- No manual configuration required
}

Config.NotificationSystem = "esx" -- "qb-core", "esx", or "custom" (if you implement your own in framework files)
```

**📄 fxmanifest.lua**

```lua
fx_version 'cerulean'
game 'gta5'

-- ESX Dependencies (REQUIRED)
dependencies {
    'oxmysql',        -- Required for database
    'es_extended',    -- ESX Framework
    'ox_lib',         -- REQUIRED: For ESX item fetching
    'ox_inventory',   -- REQUIRED: For ESX item fetching
}

-- ESX Client Files
client_scripts {
    'client/main.lua',
    'client/framework_esx.lua',  -- ESX specific functions
    'client/nui.lua'
}

-- ESX Server Files
server_scripts {
    '@oxmysql/lib/MySQL.lua',
    'server/main.lua',
    'server/framework_esx.lua',  -- ESX specific functions
    'server/database.lua'
}

-- UI Files
ui_page 'html/ui.html'
files {
    'html/ui.html',
    'html/ui.css',
    'html/ui.js'
}
```

#### ESX Server Configuration

Add to your `server.cfg`:

```bash
# Rambo3Dev Shops Creator
ensure rambodev-store-creator

# ACE Permissions for ESX
add_ace group.admin rambodev.admin allow
add_ace group.superadmin rambodev.admin allow
```

***

### 🔵 QBCore Framework Setup

#### Configuration Files

**📄 config.lua**

```lua
-- Framework Selection
Config.Framework = "qb-core"  -- Set to "qb-core"

-- QBCore Specific Settings
Config.QBCore = {
    -- These settings are automatically handled
    -- No manual configuration required
}

Config.NotificationSystem = "qb-core" -- "qb-core", "esx", or "custom" (if you implement your own in framework files)
```

**📄 fxmanifest.lua**

```lua
fx_version 'cerulean'
game 'gta5'

-- QBCore Dependencies (REQUIRED)
dependencies {
    'oxmysql',       -- Required for database
    'qb-core',       -- QBCore Framework
    'qb-inventory',  -- REQUIRED: For QBCore item fetching
}

-- QBCore Client Files
client_scripts {
    'client/main.lua',
    'client/framework_qb.lua',  -- QBCore specific functions
    'client/nui.lua'
}

-- QBCore Server Files
server_scripts {
    '@oxmysql/lib/MySQL.lua',
    'server/main.lua',
    'server/framework_qb.lua',  -- QBCore specific functions
    'server/database.lua'
}

-- UI Files
ui_page 'html/ui.html'
files {
    'html/ui.html',
    'html/ui.css',
    'html/ui.js'
}
```

#### QBCore Server Configuration

Add to your `server.cfg`:

```bash
# Rambo3Dev Shops Creator
ensure rambodev-store-creator

# ACE Permissions for QBCore
add_ace group.admin rambodev.admin allow
add_ace group.god rambodev.admin allow
```

***

### 🔄 Framework Switching Guide

#### ESX → QBCore Migration

1. **Stop** your server
2. **Edit** `config.lua`:

   ```lua
   Config.Framework = "qb-core"  -- Change from "esx"
   Config.NotificationSystem = "qb-core" -- "qb-core", "esx", or "custom" (if you implement your own in framework files)
   ```
3. **Update** `fxmanifest.lua` dependencies:

   ```lua
   dependencies {
       'oxmysql',
       'qb-core',       -- Replace 'es_extended'
       'qb-inventory',  -- Replace 'ox_lib' and 'ox_inventory'
   }
   ```
4. **Update** client/server scripts in `fxmanifest.lua`
5. **Restart** your server

#### QBCore → ESX Migration

1. **Stop** your server
2. **Edit** `config.lua`:

   ```lua
   Config.Framework = "esx"  -- Change from "qb-core"
   Config.NotificationSystem = "esx" -- "qb-core", "esx", or "custom" (if you implement your own in framework files)
   ```
3. **Update** `fxmanifest.lua` dependencies:

   ```lua
   dependencies {
       'oxmysql',
       'es_extended',  -- Replace 'qb-core'
       'ox_lib',       -- Replace 'qb-inventory'
       'ox_inventory', -- Required for ESX
   }
   ```
4. **Update** client/server scripts in `fxmanifest.lua`
5. **Restart** your server

***

### ⚙️ Advanced Configuration

#### Admin Permissions Setup

```bash
# Basic Admin Access
add_ace identifier.steam:110000100000000 rambodev.admin allow

# Group-based Permissions
add_principal identifier.steam:110000100000000 group.admin
add_ace group.admin rambodev.admin allow

# Multiple Admins
add_ace identifier.license:abcd1234 rambodev.admin allow
add_ace identifier.discord:123456789 rambodev.admin allow
```

#### Performance Optimization

```lua
-- In config.lua
Config.Performance = {
    UpdateInterval = 1000,    -- Shop sync interval (ms)
    MaxShopsPerPlayer = 50,   -- Limit shops per player
    EnableDebug = false,      -- Disable in production
}
```

***

### ✅ Installation Verification

#### Test Checklist

| Test               | Command/Action                  | Expected Result                |
| ------------------ | ------------------------------- | ------------------------------ |
| **Resource Start** | `ensure rambodev-store-creator` | ✅ No errors in console         |
| **Database**       | Check `rambodev_shops` table    | ✅ Table exists and empty       |
| **Admin Command**  | `/shopadmin` in-game            | ✅ Admin UI opens               |
| **Permissions**    | Non-admin uses `/shopadmin`     | ❌ Permission denied            |
| **Framework**      | Check F8 console                | ✅ Framework detected correctly |

#### Common Installation Issues

| Issue                    | Cause                | Solution                                                |
| ------------------------ | -------------------- | ------------------------------------------------------- |
| **Resource won't start** | Missing dependencies | Install `oxmysql` and framework                         |
| **Database errors**      | SQL not imported     | Import `shops.sql` using HeidiSQL                       |
| **Permission denied**    | ACE not configured   | Add admin permissions                                   |
| **UI not opening**       | Framework mismatch   | Check `Config.Framework` setting                        |
| **Items not loading**    | Missing inventory    | Install `ox_inventory` (ESX) or `qb-inventory` (QBCore) |

***

### 🆘 Troubleshooting

#### Framework Detection Issues

```lua
-- Check your config.lua
Config.Framework = "esx"      -- For ESX
Config.Framework = "qb-core"  -- For QBCore
```

#### Database Connection Problems

1. **Verify oxmysql** is running
2. **Check database credentials** in your server configuration
3. **Ensure MySQL server** is accessible

#### Permission Problems

```bash
# Verify ACE permissions
add_ace group.admin rambodev.admin allow
add_principal identifier.steam:YOUR_STEAM_ID group.admin
```

***

**Installation Complete!** 🎉

***

**Need Help?**

[![Discord](https://img.shields.io/badge/DISCORD-JOIN%20COMMUNITY-5865F2?style=for-the-badge\&logo=discord\&logoColor=white)](https://discord.gg/tajGY2tSN7)
