# Installation Guide

{% stepper %}
{% step %}

## 1. Download

{% hint style="success" %}

1. Download your resource from [FiveM’s Portal](https://portal.cfx.re/assets/granted-assets?search=cd_dispatch3d). &#x20;
2. Unzip the `cd_vipshop.zip` folder and place this folder in your server's resource folder.
   {% endhint %}
   {% endstep %}

{% step %}

## 2. Bridge

{% hint style="success" %}

> **This resource is the core of all Codesign scripts.** It handles framework connections, database setup, and error handling behind the scenes. When the bridge starts, it automatically detects and starts every compatible resource—including all Codesign scripts and any Codesign-compatible scripts you have installed.

1. Download **cd\_bridge** from [FiveM’s Portal](https://portal.cfx.re/assets/granted-assets?search=cd_bridge). &#x20;
2. Add cd\_bridge to the bottom of your server start config (`server.cfg`).

```
ensure cd_bridge
```

For more information on how to [**install the bridge**](https://docs.codesign.pro/paid-scripts/bridge/installation-guide), check out the full guide.
{% endhint %}
{% endstep %}

{% step %}

## 3. Config.lua

{% hint style="success" %}
You must review all configurable options in `[cd_vipshop/configs/config.lua]` and adjust them to suit your server’s needs.

\
Be sure to read the **commented help text** at the end of each line — it explains the purpose of each configuration option.

<img src="/files/3GGmaYVnUnkQtycVR2HH" alt="" data-size="original">

The most important config options are in the **Important** category at the top of `config.lua`.\
All other settings are optional.

<img src="/files/VfPI4uyouhUsdUPABF6k" alt="" data-size="original">
{% endhint %}
{% endstep %}

{% step %}

## 4.  Install Dependencies

{% hint style="success" %}
**Where Can I Find These Dependencies?**

You can find all dependencies in the `[cd_vipshop/dependencies]` folder.\
Each dependency has its own folder containing a text file with a GitHub download link.\
Alternatively, you can view the full list in the table below.

***

**Where Should I Put These Dependencies?**

Place all dependencies in your main **resources** folder, just like any other resource.\
⚠️ **Do not** place them inside the `cd_garage` folder.

***

**Do I Need to Add Them to the Server Start Config?**

* **Required:** No need to add these to your `server.cfg` — they start automatically as dependencies of this resource.
* **Optional:** Yes, these must be manually added to your `server.cfg`.
  {% endhint %}

| Resource Name       | Download                                            | Detai                                                                                         |
| ------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| **`cd_drawtextui`** | [Github](https://github.com/dsheedes/cd_drawtextui) | <p>REQUIRED by default but can be replaced.</p><h4 id="step-5-create-a-game-server"><br></h4> |
| {% endstep %}       |                                                     |                                                                                               |

{% step %}

## 5. Create a Game Server

{% hint style="success" %}
Create a game server on your [**Tebex Webstore**](https://server.tebex.io/settings/servers) to generate your **secret key**.\
If you haven’t done this before, watch the [**video guide**](https://youtu.be/YZs_hWNtYQM).

Add the following line to your **server.cfg**, replacing `CHANGE_ME` with your Tebex secret key:

```
sv_tebexSecret CHANGE_ME
```

{% endhint %}

<figure><img src="/files/9SVuFZM7OKGsUR3tji8L" alt=""><figcaption></figcaption></figure>

## 6. Create a Product on Your Tebex Webstore

{% endstep %}

{% step %}
{% hint style="success" %}
Create a product on your [**Tebex Webstore**](https://server.tebex.io/settings/servers) and add the **command** below.\
If this is your first time, follow the [**video guide**](https://youtu.be/xVCRvNG_JxI).

Add this command to the product:

{% code overflow="wrap" %}

```
tebex_purchase {"transaction_id":"{transaction}", "package":"{packageName}"}
```

{% endcode %}
{% endhint %}

{% hint style="info" %}

#### 🔁 Using subscriptions?

See **Subscriptions Setup** for monthly compatibility.
{% endhint %}
{% endstep %}

{% step %}

## 7. Config.TebexListings

{% hint style="success" %}

#### ⚠️ Important Product Setup

* The **product name** on your Tebex Webstore **must exactly match** the `ProductName` in `Config.TebexListings` (`configs/config.lua`)
* The **amount** is how many **coins the player receives** when the product is purchased
  {% endhint %}

<div data-with-frame="true"><figure><img src="/files/yiAWUA2eXrb6nXwNdnQJ" alt=""><figcaption><p>The product name on your <strong>Tebex Webstore</strong>.</p></figcaption></figure></div>
{% endstep %}

{% step %}

## 8. Configure the In-Game Shop

{% hint style="success" %}
Add or remove shop rewards (vehicles, money, items, weapons) using `Config.Shop` in `configs/config.lua`.
{% endhint %}
{% endstep %}

{% step %}

## 9. Redeem a Purchase

{% hint style="success" %}
After a player buys a product from your **Tebex Webstore**, Tebex will automatically run a command on your server (this can take **2–10 minutes**).

Once complete, the player can redeem their purchase in-game using:

{% code overflow="wrap" %}

```
/redeem tebex_transaction_id
```

{% endcode %}

This will save the player’s **vip tokens** and make them available to spend.
{% endhint %}
{% endstep %}
{% endstepper %}


---

# 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://docs.codesign.pro/paid-scripts/vip-shop/installation-guide.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.
