# Installation

## Installation

Follow these steps to install **is-store** on your server.

### 1. License Validation

This script uses the FiveM Escrow System.

Log in to your [CFX Portal](https://portal.cfx.re/assets/granted-assets) account and make sure the asset is available in your granted assets.

If the script is not listed yet, make sure your license and purchase are correctly linked to your CFX account.

### 2. Upload Resource

Download the script and extract the folder.

Place the `is-store` folder into your server resources directory.

Important: do not rename the folder.

### 3. Server Configuration

Add the resource to your `server.cfg`:

```cfg
ensure is-store
```

### 4. Setup & Database

The SQL setup is automatic for this script.

There is no manual SQL import and no extra item to add.

Configure `config/config.lua`, `config/vip_config.lua`, and the locale files to match your server.

Restart your server to apply all changes.

### 5. Requirements

Before installation, make sure you have:

5.1 A working FiveM server 5.2 ESX Legacy or QBCore 5.3 `oxmysql` 5.4 A supported inventory system if you use VIP inventory features 5.5 A supported notification, target, or key system if enabled in your config 5.6 The `is-store` resource placed in your `resources` folder

### 6. Basic Installation

6.1 Put the `is-store` folder in your server resources. 6.2 Import the SQL file if your build includes one. 6.3 Make sure `oxmysql` starts before `is-store`. 6.4 Add the resource to your `server.cfg`. 6.5 Start your framework first, then `is-store`.

Example:

```cfg
ensure oxmysql
ensure es_extended
ensure is-store
```

For QBCore:

```cfg
ensure oxmysql
ensure qb-core
ensure is-store
```

### 7. Main Configuration

**Files to edit first:**

7.1 `config/config.lua`&#x20;

7.2 `config/vip_config.lua`&#x20;

7.3 Any additional locale file you want to use

**Important settings:**

7.4 `Config.Locale` controls the active language.&#x20;

7.5 `Config.Framework` must match your framework or stay on `auto`.&#x20;

7.6 `Config.InventorySystem`, `Config.NotificationSystem`, `Config.TargetSystem`, and `Config.VehicleKeys` should match your installed systems.

&#x20;7.7 `VIPConfig.Features.salaryBonus` enables the VIP salary bonus system.&#x20;

7.8 Each VIP tier inside `VIPConfig.VIPLevels` defines the salary bonus percentage.

### 8. VIP Salary Bonus Installation

The VIP salary bonus is handled by **is-store** through exports. The paycheck logic must read the bonus percentage from the resource, then apply it in the framework paycheck file.

For detailed Tebex integration and package configuration, see [Tebex Integration Guide](/imperium-scripts/scripts/imperium-store/link-to-your-tebex.md).

**How it works:**

8.1 If the player has an active VIP tier with salary bonus enabled, the resource returns a percentage.&#x20;

8.2 If the VIP is inactive, expired, missing, or the feature is disabled, it returns `0`.&#x20;

8.3 The framework paycheck file then applies that percentage to the normal paycheck amount.

<details>

<summary>8.4 ESX installation</summary>

For ESX, replace the paycheck logic directly in:

`es_extended/server/modules/paycheck.lua`

You should replace the full paycheck content with the compatible version used by this project, or at minimum merge the VIP bonus calculation into the paycheck flow.

You can copy the file directly from the **install** folder.

**Requirements:**

8.4.1 Read the VIP salary bonus from `exports['is-store']:GetPlayerSalaryBonusPercent(source)` 8.4.2 Apply the bonus only when the returned value is greater than `0` 8.4.3 Keep the default paycheck behavior unchanged when the bonus is `0` 8.4.4 Do not hardcode VIP values inside ESX

If the VIP is not active, the export returns `0`, so the paycheck stays normal.

</details>

<details>

<summary>QBCore installation</summary>

For QBCore, replace the `PaycheckInterval` function directly in:

`qb-core/server/functions.lua`

The target is the paycheck function located around the usual paycheck section of the file.

You can copy the function in the **install** folder

What it must do:

* Call `exports['is-store']:GetPlayerSalaryBonusPercent(Player.PlayerData.source)` inside the paycheck loop
* Keep all VIP logic inside the paycheck function itself
* Apply the bonus inline to the `payment` value before money is added
* Leave the paycheck unchanged if the export returns `0`

If the VIP is not active, nothing is added.

</details>

### 9. How the VIP Salary Bonus Works

The bonus is configured in `config/vip_config.lua`.

**Example tiers:**

9.1 Bronze: `salaryBonus = 25`&#x20;

9.2 Silver: `salaryBonus = 50`&#x20;

9.3 Gold: `salaryBonus = 100`

The percentage returned by the export is the percentage that the paycheck file must apply.

**Example calculation:**

9.4 Base paycheck: `1000`&#x20;

9.5 VIP bonus: `50%`&#x20;

9.6 Final paycheck: `1500`

If the player has no valid VIP, the export returns `0`, so the final paycheck remains `1000`.

### 10. Other Feature Installations

#### 10.1 VIP inventory bonus

The VIP inventory bonus is also handled by `is-store`.

**Compatible with:**

10.1.1 `ox_inventory` (recommended)&#x20;

10.1.2 `qs-inventory`&#x20;

10.1.3 `esx_inventory`

10.1.4 `qb-inventory`

You can edit the integration manually in `shared/editable.lua` if needed.

You do not need to edit the framework core for it if your integration already uses the resource exports and VIP cache system.

#### 10.2 Autopilot

Autopilot uses the VIP level export from `is-store`.

10.2.1 Your players can use it with `/autopilot` command.

#### 10.3 AFK system

The AFK system is configured inside `config/vip_config.lua` and uses the VIP data provided by `is-store`.

**Requirements:**

10.3.1 AFK is enabled in the config&#x20;

10.3.2 The AFK zone coordinates are correct&#x20;

10.3.3 The required interaction systems are installed if you use target-based interactions

#### 10.4 VIP shop and perks

VIP perks are defined in `config/vip_config.lua`.

10.4.1 If you add or remove perks, update the VIP levels there only.&#x20;

10.4.2 The UI and server logic will use the config values automatically.

### Additional Documentation

For more information, refer to:

* [Tebex Integration Guide](/imperium-scripts/scripts/imperium-store/link-to-your-tebex.md) — How to set up Tebex packages, coins, and VIP purchases
* [Official Imperium Scripts GitBook ](/imperium-scripts/scripts/imperium-store.md)— More detailed feature documentation
* [CFX Portal](https://portal.cfx.re/) — Your server assets and licenses

### 11. Final Checks

Before restarting the server, verify:

11.1 `Config.Locale` matches an available locale file&#x20;

11.2 Your framework paycheck file has been updated for VIP salary support&#x20;

11.3 `oxmysql` starts before `is-store`&#x20;

11.4 Your VIP config has valid salary bonus values&#x20;

11.5 The `is-store` resource starts after the framework

### 12. Recommended Start Order

```cfg
ensure oxmysql
ensure your_framework
ensure is-store
```

12.1 If you use custom dependencies, start them before `is-store` as well.


---

# 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://imperiumscripts.gitbook.io/imperium-scripts/scripts/imperium-store/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.
