# FiveM

Tebex offers a **direct integration with FiveM** via a built-in native module—no plugin installation required. This seamless connection ensures players receive their purchases quickly and reliably.

***

### Prerequisites

Before beginning setup:

* You must have a **Tebex store** created with the **FiveM** store type.\
  ➤ You can check this in your Control Panel (under your store name).\
  ➤ If your store is not of type *FiveM*, please create a new store before continuing.
* Access to your FiveM server’s `server.cfg` file.
* Basic knowledge of restarting your server (via your hosting provider or local setup).

***

### Setup Instructions

#### Step 1: Locate your server.cfg

Open your `server.cfg` file—this is typically found in your `server-data` folder.

> 📝 If using FTP, make sure to save changes and upload the updated file back to the server.

***

#### Step 2: Connect your server via the Tebex Control Panel

1. Go to **Integrations > Game Servers**.
2. Click **"Connect Game Server"** (top-right).
3. Choose the **Plugin** option.

   > 💡 Although this says “plugin,” no download is needed for FiveM—this is a direct native integration.
4. Enter a recognizable **name for your server** and click **Continue**.

***

#### Step 3: 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:

```cfg
sv_tebexSecret "YOUR_TEBEX_SECRET_KEY"
```

> 🛠 Place this line near the bottom of your config file for clarity.

***

#### Step 4: Restart your FiveM server

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

> 🧠 If you're unsure how to restart your server, refer to your hosting provider’s documentation.

***

#### Step 5: 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.

***

#### Final Step: Test your setup

We recommend testing a package purchase to ensure everything is working correctly.

***

### Notes

* This integration polls the server every 60 seconds for new purchase commands.
* Commands support offline delivery when using FiveM’s native Tebex integration.

***

### FAQs

**Q: Do I need to download a plugin?**\
A: No, FiveM has native Tebex support built in—no external files required.

**Q: Can I use RCON or MySQL instead?**\
A: While those options exist, the native plugin integration is strongly recommended for FiveM servers for maximum reliability.

**Q: Why is my package not delivering?**\
A: Check that your `tebexSecret` is correct, your server has restarted successfully, and that the server console doesn’t show any errors.


---

# 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.tebex.io/creators/tebex-control-panel/game-servers/fivem.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.
