# Installation

## 1. Download Resource

Download the purchased resource from [**CFX Portal**](https://portal.cfx.re/assets/granted-assets) - the official site of FiveM with purchased resources.

***

## 2. Install Required Dependencies

This script needs a few extra resources to work properly.\
Below you will find a list of things to download - click the link, download and upload to your server just like other resources.

<table><thead><tr><th width="231.6182861328125">Resource</th><th data-type="content-ref">Download Link</th></tr></thead><tbody><tr><td><strong>Tebex-FiveM</strong></td><td><a href="https://github.com/tebexio/Tebex-FiveM">https://github.com/tebexio/Tebex-FiveM</a></td></tr></tbody></table>

***

## 3. Environment Requirements

{% stepper %}
{% step %}

### Setup Tebex API

1. Enter your [Tebex Creator panel](https://creator.tebex.io/dashboard).
2. Go to **Integrations**, then go to [**Game Servers**](https://creator.tebex.io/game-servers).
3. You will see your created server, click **Instructions** button

<figure><img src="https://3701050178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6y0J5nnTjSyc65fbCvIU%2Fuploads%2FRwuCzmXt0an3dTENRO8m%2Fimage.png?alt=media&#x26;token=f59a1f9d-a9e6-4591-a57b-6c4652fd5eb3" alt=""><figcaption></figcaption></figure>

4. Copy your tebex secret api key.

<figure><img src="https://3701050178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6y0J5nnTjSyc65fbCvIU%2Fuploads%2Fp64DbJXRtM99tZjaYcwT%2Fimage.png?alt=media&#x26;token=b33a32e0-a239-4899-bb08-90b495c64663" alt=""><figcaption></figcaption></figure>

5. Go to **Tebex-FiveM/config.json** file.
6. Set your tebex secret key

<figure><img src="https://3701050178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6y0J5nnTjSyc65fbCvIU%2Fuploads%2FawqNjLMroyX7lQJjSb6I%2Fimage.png?alt=media&#x26;token=eb89681e-afe2-44d3-ad4e-ecb7cf6fab92" alt=""><figcaption></figcaption></figure>

7. Go to your **server.cfg**
8. Add these lines:

```
sv_tebexSecret YOUR_TEBEX_SECRET_KEY # HERE YOU HAVE TO SET YOUR SECRET KEY
add_ace resource.Tebex-FiveM command allow
```

{% endstep %}

{% step %}

### Configure Packages on your Tebex

1. Enter your [Tebex Creator panel](https://creator.tebex.io/dashboard) again.
2. Go to [**Packages**](https://creator.tebex.io/packages).
3. Press the **Add New** button or edit the product you have.

<figure><img src="https://3701050178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6y0J5nnTjSyc65fbCvIU%2Fuploads%2FNV3lCMStKJrvyLAi95vZ%2Fimage.png?alt=media&#x26;token=10b36e07-e690-4b2d-85dc-f733a900e0d7" alt=""><figcaption></figcaption></figure>

4. Set the name, descriptions, image and price then go below and the **Game Server Command** section.
5. Enter one of the commands corresponding to you

{% hint style="success" %}
**Generating 20,000 Coins:**

`generateTbx {transaction} coins 20000`

**VIP Status for 28 days:**\
`generateTbx {transaction} vip 28`\
\
**Permament VIP Status:**\
`generateTbx {transaction} vip -1`\
\
\
These commands are only usable from the server console so don't worry, no admin will use it
{% endhint %}

<figure><img src="https://3701050178-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6y0J5nnTjSyc65fbCvIU%2Fuploads%2Ffc8LLKBgZrwVMzL5tpp0%2Fimage.png?alt=media&#x26;token=5192ee3f-bf1c-45fd-bcca-4efa821dadd6" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Keep in mind that once the player buys the package, the tbx code can be used according to the information provided to us by tebex (5-10 minutes), it may be faster, but it will not be immediate.
{% endhint %}

***

## 4. Start Resource

To start a resource in your `server.cfg`, ensure that it begins after your framework has been initiated. For instance, if you are using a framework like `es_extended`, you should start resource after it, like so:

```python
start [core] # For example, here is your framework (esx/qb-core)

# VMS Resources
start Tebex-FiveM
start vms_coinshop
```

Ensure there are no syntax errors or incorrect paths in your `server.cfg`.
