FiveM (Server Wrapper)

FiveM Server Wrapper Integration

The Tebex Server Wrapper for FiveM simplifies the process of delivering in-game rewards and perks to players, enhancing your Tebex Store experience. Once installed and configured, players can redeem their purchases using a unique Transaction ID directly in-game.


Overview

  • Players use: /redeem [Transaction ID]

  • Transaction IDs look like: tbx-xxxxxxxx-xxxx

  • Found in: Payment confirmation page and email

  • Purpose: To automatically deliver packages purchased via Tebex without relying on a direct Tebex plugin or RCON.


Prerequisites

Before installing the wrapper:

  1. You must have a Tebex Store connected to your FiveM server. ➤ Follow the official setup guide to connect your server.

  2. Ensure your server supports MySQL, as the wrapper requires it for tracking transactions.


Installation Instructions

1. Download and Install the Wrapper

  • Place the unzipped folder into your server’s resources directory.

    • Rename the folder to:

      nass_serverstore
    • Remove any -main suffix from the folder name if present.


2. Import Database Structure

  • Locate the codes.sql file inside the wrapper package.

  • Import it into your server's MySQL database using your preferred tool (e.g., phpMyAdmin, HeidiSQL).


3. Configure Your Server

  • In your server.cfg, add:

    ensure nass_serverstore

4. Configure Tebex Packages

For each package you want to support with the wrapper:

  • In your Tebex Control Panel, go to Packages > Edit Package > Commands.

  • Add the following command:

    purchase_package_tebex {"transid":"{transaction}", "packagename":"{packageName}"}

    ⚠️ Important: Do not modify the variable placeholders. Use them exactly as shown.

  • Click the ⚙️ gear icon next to the command and set:

    • Require Player to be Online: Execute the command even if the player is offline

  • Press Update to save changes.


5. Configure the Wrapper Script

  • Open the config.lua file located inside the nass_serverstore script folder.

  • Define your package details and settings there.


Testing the Setup

Once everything is in place:

  1. Make a test purchase on your Tebex store.

  2. In the FiveM server, enter the following command as a player:

    /redeem tbx-12345678-91011

If set up correctly, the purchased items or commands will be delivered to the player.


Notes

  • This setup bypasses the need for direct command polling by using the redeem flow.

  • Ideal for creators who want a lightweight integration or custom control over redemptions.

  • For more advanced automation, consider combining this with Tebex Plugin or RCON options.


FAQs

Q: Can I use both this wrapper and the native FiveM Tebex integration? A: It’s recommended to use one method consistently to avoid conflicts.

Q: What if the command doesn’t work? A: Verify:

  • The tebexSecret is set properly.

  • The database was imported successfully.

  • You’re using a valid tbx- transaction ID.

Last updated

Was this helpful?