DiscordDonatorPerks
Version 1.0
What is it?
DiscordDonatorRanks is a script I made for my server to give some perks to players who were part of the Tebex/Patreon subscription helping to keep us paying for the server. I wanted to give something to those players every month, but didn't want extra work for my staff to have to do. So, with DiscordDonatorRanks, it essentially automates the process of giving money and/or jobs in-game to players depending on their discord roles. It'll then save them to the database and they will not be able to access the perks for another 30 days (essentially a whole month, maybe down the line I'll make it an official month no matter what month it is). It's a quite simple script and I'm honestly surprised I haven't found one like it.
Badger's Discord Community
Images
Requirements
Installation
Find the
insert.sql
file and insert its code into your essentialmode database. (The same database you are using for ESX)
Insert.sql:
After setting up the
Donator_Data
table within your database, you will then want to move onto configuringdiscord_perms
andDiscordDonatorPerks
configs
Configuration
It's now time to understand how the configuration works
{"$1,000,000 voucher", {'Money', 1000000}}
is what I like to call aOffer
Offers
are basically what the player will be offered in-game on their character to accept or denyThe
Offers
can be seen above inImages
in which it asks the player whether they want to accept or rejectHow do we set up a job for
Silver Tier
?We first need to set it up correctly, so we need to add another
Offer
to itYou'll notice below that we added a job to
Silver Tier
simply by adding the,
and correct format of jobs being{"Invitation to Job", {'Job', 'jobname', 0}}
"Invitation to Job"
is known as theLabel
and will be displayed on the player's screen asking if they want to accept or reject it{'Job', 'jobname', 0}
is known as theJob-Details
in which the script will use to give them the job if they accept it'Job'
is the identifier of what type ofOffer
it is'jobname'
is the name of the job (the one you use to set players to work for it)0
is known as theJob-Grade
in which is the level of the job they will obtain when accepting theOffer
How do we set up another money voucher for
Silver Tier
?We once again need to add another
Offer
to itYou'll notice below we have the
Label
as"$100,000 voucher"
We have the
Money-Details
as{'Money', 100000}
We want to replace the
1
s within theserver.lua
with the roleIDs of the corresponding rank you want in that spotIf you're familiar with my work, the roleList should come as no surprise to you lol...
Note: Currently (as of version 1.0), accepting and denying jobs will put the job in the database because we don't want it asking them for joining the jobs every other time they login. In the future I'll hopefully make a command such as /select for selecting a job from where they got invitations to, so they can switch.
Another Note: What this means is, when the player first logins, they need to select the character they want the job on first (if they have a job perk), then accept it and deny the others on it. If they want the money on another account, they can just deny it and accept it the next time they login with the other character.
Download
Last updated