> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/vip-shop/getting-started/installation.md).

# Installation

## 1. Drop the resource

Copy the `vip_shop` folder into your server's `resources` directory.

```
resources/
└── vip_shop/
    ├── fxmanifest.lua
    ├── config.lua
    ├── client/  server/  shared/  locales/
    └── nui/                 <- pre-built UI (React): index.html, assets, img, fonts
```

{% hint style="warning" %}
The pre-built UI lives in the `nui/` folder (`ui_page 'nui/index.html'`). If you received the resource pre-packaged it is already in place. If you are building from source, run `npm run build:resource` first. See [Customizing the UI](/script-documentation/vip-shop/guides/ui-development.md).
{% endhint %}

## 2. server.cfg

```cfg
ensure oxmysql
ensure vorp_core        # or rsg-core (and their inventories)
ensure vip_shop

# Tebex public API token (live catalog and in-game checkout)
set vipshop_tebex_token "your-public-token"

# Tebex game server secret (lets Tebex run delivery commands)
sv_tebexSecret "your-secret-key"

# Admin permission for shop commands
add_ace group.admin vipshop.admin allow
```

{% hint style="info" %}
Start order matters: `oxmysql` and your framework core must start before `vip_shop`.
{% endhint %}

## 3. Database: nothing to import

On first start the resource creates all six tables automatically (`CREATE TABLE IF NOT EXISTS`) and seeds the configured redeem codes. There is no SQL file to run.

A healthy boot prints:

```
[vip_shop] Framework: vorp            (or: rsg)
[vip_shop] Database ready (6 tables verified, 2 seed codes).
```

## 4. Open the shop

* Command: `/vipshop` (toggles open and closed)
* From another resource: `exports.vip_shop:Open()`. RedM does not support key mappings, so use this export if you want to open the shop from a radial menu or a custom keybind resource.

## 5. Smoke test

1. `/vipshop` opens the panel and the sidebar shows all categories.
2. Console: `vipshop_givecoins <yourServerId> 5000` and the balance animates up.
3. Buy a weapon, a horse and a package, then check your inventory and stable.
4. Console: `vipshop_setmembership <yourServerId> marshal 35`. The Passes page shows your rank and coin prices drop by 10 percent.
5. Console: `vipshop_givetier <yourServerId> marshal`. The Marshal reward bundle (coins, cash, gold, items and a weapon) arrives instantly.

If any step fails, see [Troubleshooting](/script-documentation/vip-shop/reference/troubleshooting.md).
