# Tebex

## **Tebex Connection**

**Step 1: Connect your server via the Tebex Control Panel**

1. Go to **Integrations > Game Servers**.
2. Click **"Connect Game Server"** (top-right).
3. Enter a recognizable **name for your server** and click **Continue**.

**Step 2: Add the secret key to your server.cfg**

Copy the **secret key** shown in the instructions and paste the following line into your `server.cfg` file:

```
sv_tebexSecret "YOUR_TEBEX_SECRET_KEY"
```

**Step 3: Restart your FiveM server**

Restart your server as you normally would via your control panel or console

**Step 4: Verify the integration**

Return to the Tebex Control Panel and press **Continue**. If successful, your server is now linked to your Tebex store.

* If the **Continue** button doesn’t activate, check your FiveM **server console for errors**, correct any issues, and try again.
* If needed, click **Skip** and return to test later.

## Create Package

1. Click on `Game Server Commands`&#x20;

<div align="left"><figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2FawAvsyQYE4PZYgDXOlg4%2Fimage.png?alt=media&#x26;token=e9927da9-eb44-469d-88a3-cb09bd57bfa7" alt=""><figcaption></figcaption></figure></div>

2. Select your connected server

<figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2FlDx2d1iSl2EgKhHEFVeq%2Fimage.png?alt=media&#x26;token=91e65863-3c0d-4c75-8769-c21912b67c5e" alt=""><figcaption></figcaption></figure>

3. Click on `Add Command`

<figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2FN6AcJ5V7tRhz4QbAZLYX%2Fimage.png?alt=media&#x26;token=d9da3e6b-67aa-45ee-b468-319c6fb10939" alt=""><figcaption></figcaption></figure>

4. Copy this command and past there

```
on_purchase_vcoin {"transid": "{transaction}", "coin": "300"}
```

Here 300 is the number of coin you are giving. Set that as you need.

<figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2FXc6CKMiWuEXuEBJGX4F6%2Fimage.png?alt=media&#x26;token=4cd586bc-ec89-4f84-b362-3eba14d98019" alt=""><figcaption></figcaption></figure>

5. Click on the setting icon

<figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2FjXGhlbj9Z2se7DIuVGLL%2Fimage.png?alt=media&#x26;token=3067a117-c77c-48f8-ae0e-a3b17ebe4c28" alt=""><figcaption></figcaption></figure>

6. In the Require Player To Be Online, set this as `Execute the command even if the player is offline`

<figure><img src="https://2088945756-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkHcyR2RbVMcj5NHJ2HEa%2Fuploads%2FaKn7eQg7AGBcKlQ3vuyl%2Fimage.png?alt=media&#x26;token=87d9bf8b-6804-4796-aeda-18f1e113fda6" alt=""><figcaption></figcaption></figure>

7. Finish the package creation

### Note:

Player have to wait up-to 10 minutes after the purchase to redeem the code.
