> ## Documentation Index
> Fetch the complete documentation index at: https://zyra-store.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Step-by-step installation of Zyra Store scripts on FiveM

> Follow this complete guide to correctly install a Zyra Store script on your FiveM server, from download to first run.

This guide takes you through the entire installation process of a Zyra Store script on your FiveM server. Follow each step in order to ensure the resource loads correctly and without errors from the first start.

**1. Download the resource**

Access the client panel of [Zyra Store](https://zyrastore.com) with your account and go to the **My Purchases** section. Locate the script you want to install and click **Download**.

Once the `.zip` file is downloaded, extract its contents on your computer. You will find a folder with the resource name ready to be placed on your server.

**2. Folder structure**

Copy the resource folder into the `resources` directory of your FiveM server. It is recommended to organize Zyra Store scripts under their own `[zyra]` category to keep the server tidy.

The folder structure should look like this:

```text theme={null}
resources/
└── [zyra]/
    └── zyra-mi-script/
        ├── fxmanifest.lua
        ├── shared/
        │   └── config.lua
        ├── client/
        │   └── main.lua
        └── server/
            └── main.lua
```

Make sure the resource folder name matches exactly what you will use in `server.cfg` for the `ensure`.

**3. Configure the database**

If the script uses a database, you will find a `sql/install.sql` file inside the downloaded resource. You must import this file into your database before starting the resource for the first time.

You can do this with any compatible database manager:

* **HeidiSQL** — Open the connection to your database, select your FiveM server database, go to **File → Run SQL**, and select the `install.sql` file.
* **phpMyAdmin** — Enter your database, go to the **Import** tab, and upload the `install.sql` file.
* **MySQL Terminal** — Run: `mysql -u user -p database_name < sql/install.sql`

If the script does not include a `sql/` folder, this step is not necessary.

**4. Edit shared/config.lua**

Open the resource's `shared/config.lua` file with a text editor ([Visual Studio Code](https://code.visualstudio.com/) is recommended). This file contains all configurable options of the script.

At a minimum, you must adjust the following values according to your server:

```lua shared/config.lua theme={null}
Config.Framework = 'esx'      -- Options: 'esx', 'qbcore', 'standalone'
Config.Locale    = 'es'       -- Script language (if available)

-- Administrator permissions (ACE group)
Config.Permissions = {
    admin = 'group.admin',    -- Group with access to administration commands
}

-- Optional script functionalities
Config.Features = {
    enabled = true,           -- Enable or disable the script globally
}
```

Review the rest of available options and adjust them according to your server's needs. Each option includes a descriptive comment.

**5. Add ensure in server.cfg**

For FiveM to load the resource when starting the server, you must add its `ensure` in the `server.cfg` file. Make sure the script dependencies load **before** the resource itself.

```cfg server.cfg theme={null}
# Dependencies (must load before)
ensure oxmysql
ensure ox_lib

# Zyra Store script
ensure zyra-mi-script
```

Save the `server.cfg` file once the changes are made.

**6. Start the resource**

With everything configured, you can now start the script. You have two options:

* **Restart the full server** — This is the safest option for a first installation, as it guarantees all dependencies load in the correct order.
* **Use the server console** — If the server is already running and dependencies are active, you can start the resource directly from the FiveM console or txAdmin:
  ```text theme={null}
  restart zyra-mi-script
  ```

Watch the console logs during startup to confirm that no errors appear.

## Verify the installation

Once the resource is started, check that everything works correctly by following these steps:

1. **Check the server console** — No red errors related to the script should appear. A message like `[zyra-mi-script] Resource started successfully` indicates the load was successful.
2. **Connect to the server in-game** — Enter your FiveM server and verify that the script functionalities are available (menus, commands, objects, etc.).
3. **Test the available commands** — Zyra Store scripts expose the commands `/script-admin`, `/reload-config`, and `/toggle-feature` for administrators. Run `/script-admin` in-game to confirm that the script responds and that your ACE permissions are configured correctly.

If you encounter any issues during installation, check the Zyra Store support section or review the full server logs to identify the source of the error.

> [!TIP]
>
> **Load order matters**. Dependencies such as `oxmysql` and `ox_lib` must appear in `server.cfg` **before** the Zyra Store script. Otherwise, the resource may fail when trying to access functions that are not yet available.

> [!NOTE]
>
> OneSync must be enabled in your `server.cfg` for Zyra Store scripts to work correctly. Make sure you have the following line configured:
>
> ```cfg server.cfg theme={null}
> set onesync on
> ```
>
> It is recommended to use **OneSync Infinity** for servers with more than 48 players.

***

Continue with advanced configuration: [Configuration file](https://zyra-store.mintlify.site/en/configuration/config-file.md) · [Framework compatibility](https://zyra-store.mintlify.site/en/installation/framework-compatibility.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.