FRAMEWORKS
Frameworks

How to Add a Shop in ESX Shops and Items SQL Tables

April 25, 2025 · 2 min read

To enhance your FiveM server experience, adding shops is a crucial step for providing players with a dynamic economy. In this guide, we’ll cover how to add a shop in ESX shops and items SQL tables, ensuring your players have access to an engaging retail experience. Whether you’re a server developer or a roleplay enthusiast, this tutorial will give you the necessary steps and insights.

Understanding the ESX Framework

Before we dive into adding a shop, it's essential to understand the ESX framework, which is a widely used base for roleplay servers in FiveM. ESX simplifies the integration of features such as shop systems, inventory management, and player interactions.

Key Components of ESX Shops

  • Shops: These are defined in the esx_shops SQL table, which lists all available shops in the game.
  • Items: Items that can be sold are stored in the items SQL table, which contains all item details, including names, prices, and categories.

Prerequisites

Before proceeding, ensure you have:

  1. A working FiveM server with the ESX framework installed.
  2. Access to your database (using MySQL Workbench, phpMyAdmin, or similar).
  3. Basic knowledge of SQL queries.

Step-by-Step Guide to Add a Shop in SQL Tables

Step 1: Accessing Your Database

To modify your SQL tables, you first need to access your database. Here’s how:

  1. Open your preferred MySQL management tool (e.g., phpMyAdmin).
  2. Locate your ESX database.
  3. Backup your database to avoid irreversible changes by exporting it before you make any modifications.

Step 2: Adding a New Shop to the esx_shops Table

  • Locate the esx_shops table.
  • Click on the Insert tab to add a new shop entry. You will need to fill out the following columns:
    • name: A unique identifier for the shop, e.g., new_shop.
    • label: The display name of the shop, e.g., New Shop.
    • type: The type of shop (e.g., normal, virtual). For physical shops, use normal.
    • coordinates: Enter the shop's 3D coordinates as a string (e.g., `{
#fivem#esx#roleplay#server management#sql

Keep reading