๐Ÿ’ฟInstallation

๐Ÿ“ฅ Installation Guide - FiveM BattlePass Script

1๏ธโƒฃ Download & Extract Files

  • Go to Keymaster and download:

    • ๐ŸŸข 0bug-core

    • ๐Ÿ”ต 0bug_Battlepass

  • Extract the downloaded files into your resources folder.

2๏ธโƒฃ Start the Resources in server.cfg

Open your server.cfg and ensure the resources start in the correct order:

ensure qb-core        # If using QBCore
ensure es_extended    # If using ESX
ensure qbx_core       # If using QBox
ensure 0bug-core      # This must be started BEFORE the BattlePass script!
ensure 0bug_Battlepass

โœ… Note: 0bug-core must be started before 0bug_Battlepass, but after your framework (qb-core, es_extended, or qbx_core).

3๏ธโƒฃ Configure 0bug-core

WIZ_CONFIG = {
    Framework = "QBCore", -- Change to your framework: QBCore, QBox, or ESX
    MySQL = "oxmysql",    -- Database system (oxmysql recommended)
    DefaultAvatar = "https://w0.peakpx.com/wallpaper/163/205/HD-wallpaper-street-fivem-gta-gta-v-roleplay.jpg", 
    Lang = "en", -- Change language: en, fr, es, de, etc.
    Logger = false -- Enable or disable logging
}

๐Ÿ”น Optional: Change DefaultAvatar to your server logo URL.

๐Ÿ›’ Tebex Purchase Integration - BattlePass

To allow players to buy the Premium BattlePass or BattlePass credits, you need to configure Tebex to execute in-game commands when a purchase is made. Follow these steps:

๐Ÿ”น Step 1: Set Tebex Commands in the BattlePass Config

Navigate to: ๐Ÿ“‚ resources/0bug_Battlepass/Customize.lua

Ensure these two settings are properly configured:

Tebex_Credit_Readme_Code_Command = "purchase_credit",
Tebex_Premium_Readme_Code_Command = "purchase_premium"

These commands will be triggered when a player buys Premium BattlePass or Credits via Tebex.

๐Ÿ”น Step 2: Create Tebex Packages

You need to create two packages on your Tebex Webstore:

1๏ธโƒฃ Premium BattlePass Package 2๏ธโƒฃ BattlePass Credit Package (Example: Buy 50 Credits)

๐Ÿ”น Step 3: Configure Tebex Deliverables

For each package, follow these instructions:

1๏ธโƒฃ Setting Up the Premium BattlePass Package

  1. Go to your Tebex Control Panel

  2. Create a new package for the Premium BattlePass

  3. Set a price (e.g., $10 for Premium BattlePass)

  4. Go to the โ€œPackage Settingsโ€ tab

  5. Choose "Game Server Commands" as the Deliverable Type

  6. Under "Game Command", add the following command:

purchase_premium {transaction}

The {transaction} parameter will automatically be replaced with the transaction ID

  1. When a player purchases a slot:

  2. They will receive an email with the transaction ID

  3. They can enter that transaction id under the in-game menu

  4. They will unlock the premium items on the Battlepass

2๏ธโƒฃ Setting Up the BattlePass Credit Package

  • Create a new package for BattlePass credits (e.g., โ€œBuy 50 BattlePass Creditsโ€).

  • Set a price (e.g., $5 for 50 Credits).

  • Go to the โ€œPackage Settingsโ€ tab.

  • Choose "Game Server Commands" as the Deliverable Type.

  • Under "Game Command" add the following command:

purchase_credit {transaction} 50

โœ… This will give the player 50 credits after purchasing the package.

๐Ÿ’ก Replace 50 with the number of credits you want to give for that package.

Last updated