How to Create Discord Donation Tiers
Hey all! Does your server offer donation tiers? If not, you should think about adding them.
Creating donation tiers with Discord and FiveM integration is an excellent way to reward supporters while automating in-game perks. This tutorial will guide you step-by-step on how to set up donation tiers using the DiscordDonatorPerks script. This solution seamlessly integrates Discord roles with in-game rewards, simplifying management and improving user experience.
What You’ll Learn
- Setting up the required dependencies for DiscordDonatorPerks.
- Configuring donation tiers and rewards.
- Automating the perks assignment process.
Requirements
Before you begin, ensure you have the following:
- FiveM Server with ESX/QBCore framework.
- Essentialmode Database (or equivalent).
- Dependencies:
Step 1: Installation
1. Download and Extract DiscordDonatorPerks
- Download the script here (you’ll need it)
- Extract the files into your FiveM server’s
resources
folder.
2. Set Up the Database
- Open the
insert.sql
file included in the script. - Execute the following SQL code in your database (use phpMyAdmin or any MySQL client):
CREATE TABLE IF NOT EXISTS Donator_Data ( id INTEGER(11) AUTO_INCREMENT PRIMARY KEY, identifier VARCHAR(50), playerName VARCHAR(50), dateReceiveNext INTEGER(64), acceptedPerkID INTEGER(11), rankPackage VARCHAR(50) );
- Verify that the
Donator_Data
table is now in your database.
Step 2: Configure the Script
1. Edit the Configuration File
- Open the configuration file for DiscordDonatorPerks.
- Define your roles and perks in the
roleList
table. Example:luaCode kopierenroleList = { {"Bronze-Tier", 1, {"$1,000,000 voucher", {'Money', 1000000}}}, -- Bronze Tier {"Silver-Tier", 1, {"$5,000,000 voucher", {'Money', 5000000}}}, {"Gold-Tier", 1, {"$15,000,000 voucher", {'Money', 15000000}}, {"Invitation to Mafia [Gang]", {'Job', 'mafia', 0}} } }
2. Customize Offers
- Money Rewards:
'Money', <amount>
- Example:
{'Money', 1000000}
gives $1,000,000 in-game.
- Example:
- Job Rewards:
'Job', '<jobname>', <grade>
- Example:
{'Job', 'mafia', 0}
invites the player to the Mafia job at grade 0.
- Example:
Step 3: Update Role IDs
Replace the 1
placeholders in the roleList
with the actual Discord role IDs:
- Open Discord Developer Mode (
Settings > Advanced > Developer Mode
). - Right-click the role in your Discord server and select Copy ID.
- Update your script with the correct role IDs.
Step 4: Start the Resources
Add the following lines to your server.cfg
:
start discord_perms
start mysql-async
start DiscordDonatorPerks
Restart your FiveM server to apply the changes.
Step 5: Testing and Debugging
- Assign the respective roles to a test Discord user.
- Have the user join the server and check if their perks are applied.
- Use the in-game prompts to accept or deny rewards.
Best Practices
1. Regular Updates
Keep your scripts updated by checking the official documentation:
Badger Docs – DiscordDonatorPerks.
2. Inform Your Players
- Clearly communicate the perks associated with each donation tier.
- Use Discord announcements and a dedicated page on your server’s website.
3. Monitor the Database
- Periodically review the
Donator_Data
table to ensure proper functionality. - Use this data to analyze and optimize donation campaigns.
Conclusion
By setting up DiscordDonatorPerks, you can automate in-game rewards for your supporters, improve player satisfaction, and reduce staff workload. With a well-structured donation tier system, you’ll not only support your server’s costs but also create a loyal and engaged community.