Tutorials & Guides

How to Create Discord Donation Tiers

donations

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

  1. Setting up the required dependencies for DiscordDonatorPerks.
  2. Configuring donation tiers and rewards.
  3. Automating the perks assignment process.

Requirements

Before you begin, ensure you have the following:


Step 1: Installation

1. Download and Extract DiscordDonatorPerks

2. Set Up the Database

  1. Open the insert.sql file included in the script.
  2. 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) );
  3. 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.
  • Job Rewards: 'Job', '<jobname>', <grade>
    • Example: {'Job', 'mafia', 0} invites the player to the Mafia job at grade 0.

Step 3: Update Role IDs

Replace the 1 placeholders in the roleList with the actual Discord role IDs:

  1. Open Discord Developer Mode (Settings > Advanced > Developer Mode).
  2. Right-click the role in your Discord server and select Copy ID.
  3. 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

  1. Assign the respective roles to a test Discord user.
  2. Have the user join the server and check if their perks are applied.
  3. 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.

author-avatar

About Luke

I'm Luke, I am a gamer and love to write about FiveM, GTA, and roleplay. I run a roleplay community and have about 10 years of experience in administering servers.

Leave a Reply