โ๏ธConfiguration
1๏ธโฃ Customize the BattlePass Settings
Navigate to:
๐ resources/0bug_Battlepass/Customize.lua
Modify the settings as needed:
๐ Tip: Set ItemImagePath to match your inventory system (qb-inventory, ox_inventory, etc.).
2๏ธโฃ UI & XP Settings
Configure UI and XP settings inside Customize.lua
:
3๏ธโฃ BattlePass Commands
Here are the available commands you can modify:
4๏ธโฃ Season & Daily Spin Settings
Manage BattlePass duration, daily resets, and spins in Customize.lua
:
5๏ธโฃ BattlePass Server Exports
Before using these exports, you need to get the player's identifier.
Example:
๐ฎ Player Data Functions
๐น addLevel(identifier, amount)
Increases a player's level by a given amount.
Usage:
๐น removeLevel(identifier, amount)
Decreases a player's level by a given amount.
Usage:
๐น addXP(identifier, amount)
Adds XP to a player. If XP exceeds the max, it levels up the player.
Usage:
๐น setPremium(identifier, value)
Sets a player's premium status (true
or false
).
Usage:
๐ฐ Credit Functions
๐น addCredit(identifier, amount)
Adds credits to a player.
Usage:
๐น removeCredit(identifier, amount)
Removes credits from a player.
Usage:
๐น getCredit(identifier)
Returns the player's current credit balance.
Usage:
๐ Data Management Functions
๐น clearPlayerData(identifier)
Clears all stored data for a specific player.
Usage:
๐น clearPlayersData()
Clears all players' data.
Usage:
๐น clearScriptData()
Resets script-related data (e.g., daily missions, spins, weekly missions).
Usage:
๐ Notes
Use
GetPlayerIdentifier(source, 0)
to get the player's unique identifier.Make sure
0bug_Battlepass
is started before using these exports.
๐ฏ Configuring Missions, Quiz, & Rewards
โ
Editing Missions & Rewards
Navigate to:
๐ resources/0bug_Battlepass/config/
This folder contains JSON files for:
dailyMissionsList.json
(Daily missions)weeklyMissions.json
(Weekly missions)dailyQuizList.json
(Daily quiz)dailySpinList.json
(Spin rewards)freeProducts.json
(Free rewards)premiumProducts.json
(Premium rewards)
๐ Adding a Daily or Weekly Mission
๐น How it works:
title
: Name of the mission.description
: What players need to do.totalValue
: How many times they must complete it.trigger
: The event that grants XP when triggered.triggerAddXP
: How much XP players earn for completing it.
When adding support for daily and weekly missions, we need to ensure that both the client-side and server-side events are properly triggered.
๐ Server-Side Integration
To make the mission work, add the event you did set in the config inside another script (e.g., when a player eats ๐) :
๐ Client-Side Integration
๐ Modify your client-side script (e.g., consumables.lua
) to add XP when a player drinks ๐ง
๐ Setting Up Daily Quiz Questions
Daily quiz questions are stored in:
๐ resources/0bug_Battlepass/config/dailyQuizList.json
Each question follows this structure:
๐น Explanation
"1"
: Unique identifier for each quiz question."question"
: The question players will see."answers"
: A list of possible answers."title"
: The answer text."correct"
: Set totrue
for the correct answer, all others should befalse
.
๐ Setting Up Free & Premium Rewards
BattlePass rewards are stored in:
๐ resources/0bug_Battlepass/config/freeProducts.json
(for free rewards)
๐ resources/0bug_Battlepass/config/premiumProducts.json
(for premium rewards)
Each reward follows this structure:
๐น Explanation
"id"
: Unique identifier for the reward."type"
: Defines the type of reward."title"
: The display name for the reward."name"
: The database identifier of the item, vehicle, or currency."amount"
: The quantity of the reward."customImage"
(optional): If you add a custom image, place the image in: ๐resources/0bug_Battlepass/resources/image/
"item"
โ A regular inventory item."illegalItem"
โ An illegal item."cash"
โ In-game money."car"
โ A vehicle reward."xp"
โ Experience points.
๐ก Setting Up Daily Spin Rewards
Daily Spin rewards are stored in:
๐ resources/0bug_Battlepass/config/dailySpinList.json
Each reward follows this structure:
๐น Explanation
"id"
: Unique identifier for the reward."type"
: Defines the type of reward. Options:"item"
โ A regular inventory item."illegalItem"
โ An illegal item."cash"
โ In-game money."car"
โ A vehicle reward."xp"
โ Experience points.
"title"
: Name of the reward displayed in the UI."name"
: The item, cash, or car identifier used in the database."probability"
: Chance (out of 100) to get this reward."amount"
: The quantity of the reward."customImage"
(optional): If you add a custom image, place the image in: ๐resources/0bug_Battlepass/resources/image/
Last updated