SDonate Documentation¶
SDonate is an easy to use automated donation store system for Garry’s Mod, Minecraft, Rust, Ark: Survival Evolved and other Source engine games. Here you will find documentation on installing and configuring SDonate.
Contents:
Getting Your SDonate API Key¶
Before you can install SDonate, you will need to get your SDonate API key. To do this, head over to https://sdonate.com and sign in using your Steam account. Once you’ve signed in, click on “Account” at the top right, then see the section titled “SDonate API Key”. Click on “Get API Key” to get your API Key, if you have purchased SDonate it will generate your API Key. You will need to use this key later while installing SDonate.
Warning
It may take a few minutes for SDonate to register your purchase from ScriptFodder. If it says that it your purchase was not found try again in a few minutes.
Installation - One-Click Free Hosting¶
Warning
Before following the instructions here make sure you have completed the instructions in Getting Your SDonate API Key.
SDonate comes with free hosting and setup on our servers so you don’t need your own web host. To use this, simply log in using Steam at https://sdonate.com then go to the account page, then scroll down to the “Web Store” section. You must enter the domain name you want into the “Domain” field. The URL to your store will be https://sdonate.com/stores/<yourdomain>, so if I enter my domain as “myamazingdomain”, the URL to my store will be https://sdonate.com/stores/myamazingdomain. You must then choose the main currency of your store, people will still be able to pay using their own currencies, but it will be converted to your main currency in your PayPal account, and the prices on your store will be displayed in the main currency. Once you’ve done this, click the “Activate Web Store” button to create your store. If all goes well, it will come up with a link that you will need to go to to activate your store. Once activated, you can go back to the account page to see the URL to your store.
Note
If you get a blank page or Error 500 when you go to your store, go to https://sdonate.com/stores/<yourdomain>/installation.php to complete installation. For my example I would need to go to https://sdonate.com/stores/myamazingdomain/install.php
That’s your web store set up! If you are using SDonate with Minecraft or Garry’s Mod servers go to “Installation - Garry’s Mod Server” or “Installation - Minecraft Server” to get instructions for installing the SDonate plugin. Otherwise, you can move on to the “Configuration” section.
Installation - Using your own web server¶
Warning
Before following the instructions here make sure you have completed the instructions in Getting Your SDonate API Key.
SDonate comes with all of the files necessary for you to set up a store on your own web server. Follow the instructions below carefully to avoid any errors.
Requirements¶
Before installing SDonate, you should check that your web server has the following requirements for SDonate to work.
- PHP >= 5.5
- MySQL
- PDO
SDonate also requires access to some functions that some hosts may block. To check these functions work, download https://sdonate.com/downloads/compatibilitychecker.zip then unzip it into the root folder of your web host (usually called “public_html” or “public”), then go to http://<yourdomain.tld>/compatibilitychecker.php (for example, if your domain is “myamazingdomain.com”, go to http://myamazingdomain.com/compatibilitychecker.php). If everything is alright, it will say your host is compatible, otherwise you will need to contact your host to fix any issues or find a new host.
1. Extracting SDonate¶
The first thing you will need to do after do after downloading SDonate is extract the zip. It’s best to extract it into a folder on your desktop for easy access.
2. Setting the admin¶
After you’ve extracted SDonate, go into the “web” folder and open the file called “install.php” using a text editor. Notepad will work but a better text editor such as Notepad++ is preferable as it makes things easier to see. Once you’ve opened it, you will see three lines starting with $adminsteamid
, $adminusername
and $adminpassword
. You will need to decide whether you want the first admin (you) to log in using a username and password or using Steam login. If you want to log in using Steam, edit the line starting with $adminsteamid
and put your Steam ID in between the quotation marks. For example, my Steam ID is 76561198134262586, so I would change it to:
$adminsteamid = '76561198134262586';
If you want to use a username and password to log in as admin, make sure that $admingsteamid is empty, so it looks like:
$adminsteamid = '';
Then edit $adminusername and $adminpassword with the username and password you want. For example, if my username is “adminuser” and my password is “mypassword1”, I would change it to:
$adminusername = 'adminuser';
$adminpassword = 'mypassword1';
Note
SDonate requires $adminsteamid
to be in SteamID64 format and NOT SteamID32. A SteamID64 looks like ‘76561198134262586’ while a SteamID32 looks like ‘STEAM_0:0:86998429’.
3. Setting your API keys¶
In the extracted SDonate folder, open the “web” folder again then open “config.php”. You will see a line starting with $sdonateapi
, inside the quotation marks next to this copy your SDonate API key you generated earlier. You will also need your Steam API key. To get your Steam API key head over to https://steamcommunity.com/dev/apikey. If you have not already filled in this form, do so now to get your Steam API Key. Now, in “config.php”, in the quotation marks next to $steamapi
copy your Steam API key and save your changes.
4. Setting up the MySQL database¶
Using a database manager like phpMyAdmin or your host’s own database management system, you will need to create a database for SDonate as well as a user that has full access to that database, the instructions for this vary by system so they are not covered here, but it should be simple enough. In “config.php”, you will see four lines starting with $dbhost
, $dbname
, $dbusername`` and $dbpassword
. $dbhost
is the ip of your MySQL server. Unless your MySQL server is on a different IP to your website, you should leave this as ‘localhost’. In the quotation marks next to $dbname
enter the name of the database you created, this should include any prefixes also. Next to $dbusername
and $dbpassword
enter your database user’s username and password, then save your changes.
5. Setting the main currency of your store¶
In “config.php”, next to $currencycode
you will need to enter the currency code of the main currency you want your store to use. Users will be able to pay using their own currencies, but this is the currency that all of your prices will be displayed in. Below is a list of valid currency codes. You only need to enter the three letter code.
- AUD - Australian Dollar
- CAD - Canadian Dollar
- DKK - Danish Krone
- EUR - Euro
- GBP - British Pound Sterling
- MXN - Mexican Peso
- NOK - Norwegian Krone
- NZD - New Zealand Dollar
- PLN - Polish Zloty
- NOK - Norwegian Krone
- RUB - Russian Ruble
- SEK - Swedish Krone
- USD - United States Dollar
Warning
StarPass is only available as a payment method if you select “EUR” as the main currency.
6. Setting up Google reCAPTCHA (OPTIONAL)¶
Google reCAPTCHA is a captcha system which prevents brute-force log in attempts. If you wish to only allow people to log in through Steam you can skip this step as it will have no benefit. If you wish to allow people to log in using a username and password, you should complete this to make your site more secure. To set it up go to https://www.google.com/recaptcha/admin and sign in using a Google account, or register if you don’t have one. Where it says “Register a new site”, enter anything you want under “Label” and enter your domain name under “Domains” and click register. On the next page, under “Keys” you will be given a Site Key and a Secret Key. Enter the Site Key next to $recaptchasitekey
in “config.php” and the Secret Key next to $recaptchasecretkey
.
7. Creating the folder on your web host¶
On your web host, in the public folder (usually called “public”, “public_html” or sometimes just “www”), create a folder for SDonate to go in. Now, using FTP or your web host’s build-in file browser upload everything from INSIDE the “web” folder into the folder you just created. When this is done, navigate to http://<yourdomain.tld>/<yourfolder>/install.php to complete installation, so if your domain is “myamazingdomain.com” and the folder you created is called “donate”, you’d go to http://myamazingdomain.com/donate/install.php. If all is well it will just say “Installation complete!”, and if not, it will tell you what is wrong.
8. Log into your store and check that the directory has been detected properly¶
Now, log into your store using the admin account you selected then click on “Admin” at the top right. Now click on “Info” and it will tell you the URL that SDonate has detected it has been installed in. If this is incorrect, you will need to type the correct URL next to $dir in config.php. It is important that this is correct for PayPal payments to work.
You have now installed SDonate on your web server! You should look at the section on setting up payment information to accept payments.
Installation - Garry’s Mod Addon¶
Before using SDonate with a Garry’s Mod server you must install the SDonate Garry’s Mod addon on your server.
1. Extracting the addon¶
If you haven’t already, download SDonate from ScriptFodder then extract the “sdonate-gmod-plugin” folder somewhere on your PC, preferably on your desktop for easy access.
2. Configuring the addon¶
Go into the extracted “sdonate-gmod-plugin” folder, then open the “lua” folder. Open the file called “sdonate_config.lua” using your text editor. In the quotation marks next to SDonateURL
enter the URL of your pluginapi.php file. If you installed SDonate using the free included one-click hosting and setup, go to https://sdonate.com and go to your account page, you will see the URL next to “Plugin API URL”. If you installed SDonate’s website on your own web server, the url is http://<yourdomain.tld>/<yourfolder>/pluginapi.php, so if my domain was “myamazingdomain.com” and the folder SDonate was installed in is called “donate”, the URL would be http://myamazingdomain.com/donate/pluginapi.php. Now, in the quotation marks next to SDonateAPIKey
enter your SDonate API key you generated earlier, and next to SDonateServerIP
enter your Garry’s Mod server’s IP and next to SDonateServerPort
. The default chat command to open your donation store website is ”!donate”, but if you want to change this to something else change SDonateCommand
.
Note
If your server IP is something like 142.34.63.124:27015 the IP is the part before the :
and the port is the part after the :
. So in this case SDonateServerIP
would be “142.34.63.124” and SDonateServerPort
would be “27015”.
3. Upload to your server¶
Save all your changes to “sdonate_config.lua”, then upload the “sdonate-gmod-plugin” folder to your Garry’s Mod server’s addon folder, then restart your Garry’s Mod server.
Note
After you’ve finished installing the addon to your Garry’s Mod server you will still need to follow the instructions in Adding a Server.
Installation - Minecraft Plugin¶
Before using SDonate with a Minecraft server you must install the SDonate Minecraft plugin on your server.
1. Extracting the plugin¶
If you haven’t already, download SDonate from ScriptFodder then open the “sdonate-minecraft-plugin” folder and extract “SDonate Plugin.jar” somewhere on your PC, preferably on your desktop for easy access.
2. Upload to your server and configure¶
Upload “SDonate Plugin.jar” into your Minecraft server’s plugin directory then restart your server. You will probably get a lot of errors, don’t worry, this is normal. In your Minecraft plugin directory there should be a folder called “SDonate_Plugin”. Open this folder, and inside there is a file called “config.yml”. Edit this file, making the following changes:
- Next to
URL
write the URL to your pluginapi.php file. If you installed SDonate using the free included one-click hosting and setup, go to https://sdonate.com and go to your account page, you will see the URL next to “Plugin API URL”. If you installed SDonate’s website on your own web server, the url is http://<yourdomain.tld>/<yourfolder>/pluginapi.php, so if my domain was “myamazingdomain.com” and the folder SDonate was installed in is called “donate”, the URL would be http://myamazingdomain.com/donate/pluginapi.php. - Next to
Plugin API Key
write your SDonate API you generated earlier. You can get it from your account page at https://sdonate.com. - Next to
IP
write the IP of your Minecraft server. This must be in numeric form i.e. “123.53.24.63” and NOT a domain like “play.myamazingserver.com”. - Next to
Port
write the port your Minecraft server is running on. By default this is 25565.
Note
If your server IP is something like 142.34.63.124:25565 the IP is the part before the :
and the port is the part after the :
. So in this case IP
would be “142.34.63.124” and Port
would be “25565”.
3. Restart your server¶
Save all your changes to “config.yml”, then restart your Minecraft server.
Note
After you’ve finished installing the plugin to your Minecraft server you will still need to follow the instructions in Adding a Server.
Installation - Rust Oxide Plugin¶
Before using SDonate with a Rust server you must install the SDonate Oxide plugin on your server.
1. Extracting the plugin¶
If you haven’t already, download SDonate from ScriptFodder then open the “sdonate-rust-plugin” folder and extract “SDonate.cs” somewhere on your PC, preferably on your desktop for easy access.
2. Upload to your server and configure¶
Upload “SDonate.cs” into the “oxide/plugins” directory then restart your server. Now, in the “oxide” folder there should also be a folder called “config”, and inside the “config” folder is a file called “SDonate.json”. Open this file and make the following changes:
- Next to
PluginAPIUrl
write the URL to your pluginapi.php file. If you installed SDonate using the free included one-click hosting and setup, go to https://sdonate.com and go to your account page, you will see the URL next to “Plugin API URL”. If you installed SDonate’s website on your own web server, the url is http://<yourdomain.tld>/<yourfolder>/pluginapi.php, so if my domain was “myamazingdomain.com” and the folder SDonate was installed in is called “donate”, the URL would be http://myamazingdomain.com/donate/pluginapi.php. - Next to
SDonateAPIKey
write your SDonate API you generated earlier. You can get it from your account page at https://sdonate.com. - Next to
ServerIP
write the IP of your Rust server. This must be in numeric form i.e. “123.53.24.63” and NOT a domain like “play.myamazingserver.com”. - Next to
ServerPort
write the port your Rust server is running on. By default this is 28015.
Note
If your server IP is something like 142.34.63.124:28015 the IP is the part before the :
and the port is the part after the :
. So in this case IP
would be “142.34.63.124” and Port
would be “28015”.
3. Restart your server¶
Save all your changes to “SDonate.json”, then restart your Rust server.
Note
After you’ve finished installing the plugin to your Rust server you will still need to follow the instructions in Adding a Server.
Installation - Sourcemod Plugin¶
Note
Sourcemod is only used for CS:GO, TF2 and L4D2. Installing the Sourcemod plugin is optional, however without it you will be unable to use expiration commands.
1. Extracting the plugin¶
If you haven’t already, download SDonate from ScriptFodder then extract the “sdonate-sourcemod-plugin” folder somewhere on your PC, preferably on your desktop for easy access.
2. Upload to your server and configure¶
Upload everything INSIDE the “sdonate-sourcemod-plugin” folder into “/addons/sourcemod” on your server. Now, restart your server and go to “cfg/sourcemod”, in here should be a file called “sdonate.cfg”, open it and edit the settings as follows:
- Next to
sdonate_apikey
write your SDonate API you generated earlier. You can get it from your account page at https://sdonate.com. - Next to
sdonate_serverip
write the IP of your server. This must be in numeric form i.e. “123.53.24.63” and NOT a domain like “play.myamazingserver.com”. - Next to
sdonate_serverport
write the port your server is running on. By default this is 27015. - Next to
sdonate_url
write the URL to your pluginapi.php file. If you installed SDonate using the free included one-click hosting and setup, go to https://sdonate.com and go to your account page, you will see the URL next to “Plugin API URL”. If you installed SDonate’s website on your own web server, the url is http://<yourdomain.tld>/<yourfolder>/pluginapi.php, so if my domain was “myamazingdomain.com” and the folder SDonate was installed in is called “donate”, the URL would be http://myamazingdomain.com/donate/pluginapi.php.
Note
If your server IP is something like 142.34.63.124:28015 the IP is the part before the :
and the port is the part after the :
. So in this case IP
would be “142.34.63.124” and Port
would be “28015”.
3. Reload The Plugin¶
Save all your changes to “sdonate.cfg”, then either use the command “sm plugins reload sdonate” in your SERVER console, or just restart the server.
Note
After you’ve finished installing the plugin to your Rust server you will still need to follow the instructions in Adding a Server.
Updating SDonate Web Store¶
If you are using the one-click setup and hosting, you don’t need to worry about updating your website, it will be done automatically for you. If you are using your own web server, follow the instructions below to update.
- Download the newest version from Scriptfodder, then extract it somewhere on your PC.
- In the extracted folder, go into the “web” folder and delete “config.php” and the “img” folder.
- Upload everything from inside the new “web” folder to the folder you installed SDonate in on your web host. Overwrite all files.
You are now on the latest version.
Updating Garry’s Mod Addon¶
To update the SDonate Garry’s Mod addon, follow the instructions below to update.
- Download the newest version from Scriptfodder, then extract it somewhere on your PC.
- In the extracted folder, go into the “sdonate-gmod-plugin” folder, then into “lua” and delete “sdonate_config.lua”.
- Upload the new “sdonate-gmod-plugin” folder to your Garry’s Mod server’s addon folder. Overwrite any files already there.
You are now on the latest version.
Updating Minecraft Plugin¶
To update the SDonate Minecraft plugin, simply upload the “SDonate Plugin.jar” from the latest version of SDonate to your Minecraft server’s plugin folder, overwriting the old one.
Accessing the Admin Dashboard¶
To access your SDonate store’s admin dashboard, sign in to the store, then, if you are admin at the top right there is a button that says “Admin”, click this.
At the side you will see various buttons which lead to different sections of the dashboard. For more information on what each of these sections are for see below:
Statistics¶
The statistics section is where you can see all of the stats on purchases your users have made. It shows a graph of purchases as well as a list of purchases below. Click on the “eye” icon next to a purchase to see more information.
General Settings¶
“General Settings” contains settings which change how the store operate. An explanation of all the settings is below:
- Maintenance Mode - When you enable maintenance mode, users are unable to access the site to make purchases but the admin dashboard is still accessible.
Note
If you’ve enabled maintenance mode and can’t find your way back to the admin dashboard, just go to http://yourdomain.com/folder/login.php, or if you are using the one-click hosting and setup this will be at https://sdonate.com/stores/<yourdomain>/login.php. When you have logged in, go to http://yourdomain.com/folder/dashboard.php (https://sdonate.com/stores/<yourdomain>/login.php if using free SDonate hosting).
- Login Mode - This changes whether users are allowed to use username and password or Steam login, or whether they must log in using Steam only.
- Payment Mode - If set to default, users can purchase packages directly and pay as they are purchasing the package. If set to “Credit Only”, users must purchase credit before using it to buy a package. The purpose of this is explained in Setting Up PayPal.
- PayPal Enabled - Enables/disables PayPal payments.
- PayPal Email - The purpose of this is explained in Setting Up PayPal.
- PayPal Sandbox - Enables/disables PayPal sandbox mode. When sandbox mode is enabled no money will actually be used so it’s useful for testing, make sure it’s disabled before going live though.
- Credits Enabled - If this is enabled users can purchase credits to purchase packages with. If “Payment Mode” is set to “Credit Only” this cannot be disabled.
- Store Name - Sets the name of the store that will appear on the store and on PayPal.
- Store Logo - Upload an image to use as the store’s icon at the top right or select “Text” to simply use the store name as the logo.
- Home Page Text - Set the text that shows up on the homepage of your site.
Note
The following settings will only appear if your main currency is set to EUR/Euros.
- StarPass Enabled - Enables/disables StarPass payments.
- StarPass Access Page URL/StarPass Monetization Component URL/StarPass Protection Code - The purpose of these is explained in Setting Up StarPass.
Package Manager¶
The package manager is where you add/edit servers and packages. For more information on adding a server see Adding a Server and for adding a package see Adding a Package.
Users¶
The “Users” section is where you can manage your users and view their purchases. To promote/demote a user to/from admin, change their “Usertype” and it will be automatically applied. Click on the “eye” icon to see more information about the user and a list of their purchases.
Warning
Users who are admin have full access to the SDonate admin dashboard, only give admin powers to people you have absolute trust in.
Theme Editor¶
The theme editor is where you can edit the style of SDonate. Colours are entered as hex colour codes, which you can get at http://www.colorpicker.com/.
Email Settings¶
“Email Settings” contains settings related to sending confirmation emails to your buyers. Instructions to enable sending emails to buyers are as follows:
- You will need an email address to send emails from. You can use one from a provider such as GMail or Outlook, or you can use your own SMTP/mail server. Enter this email address in “Sending Email Address” and the password for this email account in “Sending Email Password”.
- Enter the SMTP server, port and encryption protocol in the relevant boxes. Below are some SMTP details for major email providers:
Email Provider | SMTP Server | Port | Protocol |
---|---|---|---|
GMail | smtp.gmail.com | 465 | SSL |
Outlook/Live/Hotmail | smtp-mail.outlook.com | 587 | TLS |
Yahoo | smtp.mail.yahoo.com | 465 | SSL |
In “Purchase Complete Email Subject” “Purchase Complete Email Subject” enter the subject and body text respectively to appear in purchase confirmation emails. You can use variables to replace text with information about the purchase, the valid variables are:
- {{VAR=Username}} - The purchaser’s username
- {{VAR=Package}} - The name of the package they purchased
- {{VAR=Store Name}} - Your store’s name
Hit “Submit” to save.
Note
If you’ve set “Store Logo” to an image in “General Settings”, it will use this logo in the emails sent, otherwise it will use the default SDonate logo.
Terms of Service¶
The Terms of Service are displayed to the user as they are purchasing and they must agree to them. For this reason it is recommended that you cover your refund policy in your Terms of Service.
Logs¶
This is where error events related to payment and RCON commands are stored. This should give you a better idea of what is going wrong, see Common Errors for help on fixing common errors.
Payment Methods Setup¶
Before users can make any purchases you will need to configure your payment methods. To configure SDonate you will need to log in to your web store using the admin account. When logged in, you can click on “Admin” at the top right to access the admin dashboard.
Setting Up PayPal¶
SDonate’s method of dealing with PayPal payments has changed so you no longer need any API details. Existing users will need to follow these instructions to ensure their store doesn’t stop working.
How to Set Up PayPal for SDonate¶
- Sign into your PayPal account at https://paypal.com.
- Open this link to go to the PayPal IPN settings
- Click on the “Choose IPN Settings” button
- Under “Notification URL” enter the URL of your store’s “paypalipn.php” file. If you are using SDonate’s free webstore, you can find this URL on the SDonate account page, next to “PayPal IPN URL”. If you are using your own web server, enter the URL of your store and add “/paypalipn.php” at the end. So, if the URL of your store is “http://myamazingsite.com/donate/”, enter “http://myamazingsite.com/donate/paypalipn.php” here.
- Make sure “Receive IPN messages (Enabled)” is selected then click “Save”.
- Click on this link to go to the PayPal blocked payments settings page. Make sure your settings look like this:

- Go to https://sdonate.com and sign in, then go to “Account”, then click on “Change PayPal Email Address”.
- Enter the email address of your PayPal account here (make sure you’re entering the PRIMARY address of your PayPal account, meaning if you have more than one email address on your PayPal account, use the primary one) and click “Submit”.
Test PayPal/How to Set Up PayPal Sandbox (Optional but Recommended)¶
If you want to test PayPal payments without using real money, you will need to set up “PayPal Sandbox”.
You will need to create two sandbox accounts, a buyer and a seller, go to https://developer.paypal.com/ and log in using your normal PayPal account.
Click on this link to go to the sandbox account page.
Click on the “Create Account” button, then follow the settings guide below:
- Country - Select the country that uses the SAME CURRENCY your store uses, so for example, if your store uses GBP, make sure “United Kingdom” is selected.
- Account Type - Select “Personal (Buyer Account)”
- Email Address - Enter email address you want, this doesn’t need to be verified however it must be unique, you can’t use the same email twice.
- Password - Enter a password for the new account
Leave the rest of the settings as default, then click “Create Account”. You’ve just made a test buyer account.
Create another account using the same settings as before, but this time set “Account Type” to “Business (Merchant Account)”. This is your sandbox seller account.
Go to https://sandbox.paypal.com and log in using your SELLER sandbox account you just created then click here to go to the IPN settings for your sandbox account.
Click “Edit Settings”, then under “Notification URL” enter the URL of your store’s “paypalipn.php” file. If you are using SDonate’s free webstore, you can find this URL on the SDonate account page, next to “PayPal IPN URL”. If you are using your own web server, enter the URL of your store and add “/paypalipn.php” at the end. So, if the URL of your store is “http://myamazingsite.com/donate/”, enter “http://myamazingsite.com/donate/paypalipn.php” here.
Make sure “Receive IPN messages (Enabled)” is selected then click “Save”.
To Enable sandbox testing mode on your store, first go to https://sdonate.com and sign in, then go to “Account”, then click on “Change PayPal Email Address”. Enter the email address of your sandbox SELLER account and click “Submit”. Now go to your store’s admin dashboard then to “General Settings”. Change “PayPal Sandbox” to “Enabled” and submit.
To disable sandbox mode and enable real purchases go back to https://sdonate.com and change your PayPal email back to your real one, then go to your store’s admin dashboard and change “PayPal Sandbox” back to “Disabled”.
Warning
Make sure you disable sandbox mode after you are done testing, otherwise people will be unable to purchase.
Setting Up StarPass¶
Note
StarPass will only be available if your store’s main currency is EUR/Euro. Currently, users can only use StarPass by using it to add €3 credit at a time, this is due to limitations with StarPass’ API.
If you haven’t already, create an account at http://starpass.fr and sign into it. Now, at the left hand side click on “Create a Monetization Component” or “Créer un document”.

Now click on “StarPass CLASSIC”.

Enter anything you want in “Document Name”/Nom du Document. Now go to your donation store, go to the admin dashboard and click on “General Settings”. Scroll down and you will see “StarPass Access Page URL” and “StarPass Monetization Component URL”. Copy these values into the corresponding fields on StarPass as shown in the picture below. Enter anything you want in “Test Code”/”Code de test”, set “Number of codes”/”Nombre de codes” to 1, and “Validity of Access Code”/”Validité du code d’accès” to once/1 fois. For “Cost/Profits” or “Coût / Gain” set it to “I would like a payout of”/”Je souhaite un reversement de” €3.00.

Now copy the settings in the pictures below:




Once you have saved these settings, copy the code from “Protection Script Installation”/”Installation du script de protection”, go to your web store’s admin dashboard, then “General Settings” and enter it under “StarPass Protection Code”, make sure StarPass is enabled then submit your settings.

Adding a Server¶
Note
If you are adding a Minecraft or Garry’s Mod make sure you have followed the instructions to install the relevant addon. If you’re adding a CS:GO, TF2 or L4D2 server and want to use expiring commands you will need to install the Sourcemod plugin also.
To add a server, open the SDonate admin dashboard, then go to the “Package Manager”, then click the “Add Server” button. Select the game your server is for, then change the following settings:
- Name - Enter the name of your server. This will be the name that shows up in your store.
- Image - You can optionally upload an image for this server’s icon. If you leave this blank the default game image will be used.
- IP Address - Enter the IP address of your server. This is the part before the ”:”, the port is the part after. Do not include the port.
- Port - Enter the port of your server.
- RCON Password (Not required for Garry’s Mod, Minecraft servers or servers where the Sourcemod plugin is installed) - Enter the RCON password for your server.
- Enabled - Check this to enable the server in your store. If this is not checked the server will not show up in your store.
Adding a Package¶
To add a package, open the SDonate admin dashboard, then go to the “Package Manager”, then click the “Add Package” button. Select the game your server is for, then change the following settings:
- Title - Enter the title to give your package.
- Description - Enter a description for your package.
- Image - You can optionally upload an image for this package’s icon. If you leave this blank the default game image will be used.
- Pay What You Want - If this is enabled the user will be able to choose how much they want to pay. The price they enter must be equal to or higher than the “Price” setting.
- Price - Enter the price of this package. If “Pay What You Want” is enabled, this will be the minimum price they must pay.
- Max Purchases - This is the maximum number of times a user can purchase a package. Set this to 0 to allow infinite purchases.
- Commands - This is where you choose the actions to be ran when a user purchases this package. When adding a command, you can choose what servers this command will be run on. Note that this command will run once for every server ticked. You may have to enter parameters for this package also. For each paramater, you can tick “User Chooses” to allow users to enter their own parameters. More info on commands can be found in
commands/commands
. - Duration - Enter how long this package should last in days. Set to 0 to never expire.
About Commands/Actions¶
Command Variables¶
You can use the following variables in command parameters to replace it with the user’s own info. Valid variables are as follows:
- {{VAR=STEAMID}} - The user’s 64-bit Steam ID i.e. 76561197960287930
- {{VAR=STEAMID32}} - The user’s 32-bit Steam ID i.e. STEAM_0:0:111010
- {{VAR=STEAMID3}} - The user’s SteamID3 i.e. U:1:222020
- {{VAR=STEAMUSERNAME}} - The user’s Steam username (NOTE: This should not be used to assign packages, since more than one user can have the same Steam username, this should only be used for things like sending a personalised message such as “Thanks for purchasing, {{VAR=STEAMUSERNAME}}”)
- {{VAR=Minecraft_Username}} - The user’s Minecraft username.
Creating User Choices¶
If you have ticked “User Chooses”, you can create choices for the parameter. If you do not create any choices, the buyer will be able to enter anything they want, but if you create at least 1 choice they will have to choose between the options you define. When creating a choice, you have to enter a name, value and price. The name is what is displayed to the buyer when choosing, the value is the actual parameter value and the price is the amount added to the package price if this choice is chosen. For example, if creating a choice for the “DarkRP Add Money” command, if you enter the name as “Ten Thousand Dollars”, value “10000” and price “0”, this will add nothing to the base package price and will add $10000 to their DarkRP money if this option is chosen.
- For more info on the actions available for various games see:
Actions - Garry’s Mod¶
Console Command¶
Run a console command on the player.
Parameters:
- Command - The console command to run.
- Package Expiry Command - The command to run when the package expires or when the package is revoked.
Custom LUA¶
Run a custom LUA command.
Parameters:
- LUA - The LUA code to run.
- Package Expiry LUA - The LUA code to run when the package expires or when the package is revoked.
Add To Group¶
Add the user to the specified group using either ULX, FAdmin, Evolve, Assmod or ServerGuard. Make sure to choose the right one for the admin mod your server is using.
Parameters:
- Rank - The rank to give the user. Note that for Assmod this must be the rank number and for all other mods it must be the rank name.
DarkRP Add Money¶
Give the user the specified amount of money in DarkRP.
Parameters:
- Money - The amount of money to give the user.
DarkRP Custom Job¶
Create a custom job in DarkRP.
Parameters:
- Job Name - The name of the job.
- Models - The file paths of the models available for this job separated by commas. Example - /path/to/model/model1.mdl,/path/to/model/model2.mdl,/path/to/model/model3.mdl If you want to offer the user a choice of models enter the path to each one in a seperate choice.
- Description - The job description.
- Weapons - The weapons this job spawns with separated by commas. Example - weapon_ak472, weapon_keypadchecker, lockpick If you want to offer the user a choice of weapons enter each one in a seperate choice.
- Salary - This job’s salary.
- Has License - Whether this job has a weapon license. Enter 0 for no and 1 for yes.
Pointshop 1 Points¶
Give the user the specified amount points in Pointshop 1.
Parameters:
- Points - The amount of points to give the user.
Pointshop 2 Standard Points¶
Give the user the specified amount of standard points in Pointshop 2.
Parameters:
- Points - The amount of standard points to give the user.
Send Chat Message to Buyer¶
Put a message in the chatbox of the buyer.
Parameters:
- Message - The message to display in the user’s chatbox.
- Expiration Message - The message to display in the user’s chatbox when the package expires or is revoked.
Send Chat Message to All Players¶
Put a message in the chatbox of all players on the server.
Parameters:
- Message - The message to display in all players chatboxes.
- Expiration Message - The message to display in all players chatboxes when the package expires or is revoked.
CombineControl Donation¶
Add a donation perk to the CombineControl donations database.
Parameters:
DB Host - The hostname the MySQL server is running on
DB Name - The name of the database
DB Username/DB Password - The username and password of the user used to access the database
Character ID - Set this to “User Chooses” to let them enter their own character ID, or enter -1 to use Prop Limit Increase, Ragdoll Limit Increase, Scoreboard Title or Scoreboard Title Color donation types.
Donation Type - The type of donation perk. Valid donation types are as follows (only enter the number):
- 1 - Credits
- 2 - Strength Stat
- 3 - Speed Stat
- 4 - Toughness Stat
- 5 - Agility Stat
- 6 - Perception Stat
- 7 - Aim Stat
- 8 - All Stats (global stat boost)
- 9 - Custom Model
The following donation types only work if Character ID is set to -1:
- 1 - Prop Limit Increase
- 2 - Ragdoll Limit Increase
- 3 - Scoreboard Title
- 4 - Scoreboard Title Color (in the form “r g b” 0-255)
Donation Data - Enter the relevant data for the donation type chosen. For example, if you’d chosen “Credits” as the donation type, and enter “500” in the donation data, the person will receive 500 credits.
Actions - Minecraft¶
Console Command¶
Run a console command on the player.
Parameters:
- Command - The console command to run.
- Package Expiry Command - The command to run when the package expires or when the package is revoked.
Actions - Rust¶
Custom Command¶
Run a console command on the server.
Parameters:
- Execution Time - Choose whether the command will run as soon as the purchase is complete or when the user next joins the server, for most commands you should choose “On Join” to make sure the commands runs properly.
- Command - The console command to run.
- Expiration Command - The command to run when the package expires or when the package is revoked.
Give Item¶
Give the purchaser X amount of a certain item.
Parameters:
- Item Shortname - The shortname of the item to give the user. You can find a list of these at http://docs.oxidemod.org/rust/#item-list.
- Amount - The amount to give.
Give Blueprint¶
Give the user a blueprint for a certain item.
Parameters:
- Item Shortname - The shortname of the item for the blueprint. You can find a list of these at http://docs.oxidemod.org/rust/#item-list.
Actions - Other Games¶
Important Notes¶
RCON commands are ran as soon as the buyer purchases the package, for this reason it is recommended that you DO NOT use commands that require the user to be connected to the server, as they will not work if the user is not connected to the game server when they are making a purchase. Test commands using the “Test Server” button to see which commands work. Use “Custom Command” instead of “RCON Console Command” if the Sourcemod plugin is installed.
RCON Console Command¶
Run a console command on the player via RCON.
Parameters:
- Command - the command to run
Custom Command (REQUIRES SOURCEMOD PLUGIN)¶
Run a console command on the server.
Parameters:
- Execution Time - Choose whether the command will run as soon as the purchase is complete or when the user next joins the server, for most commands you should choose “On Join” to make sure the commands runs properly.
- Command - The console command to run.
- Expiration Command - The command to run when the package expires or when the package is revoked.
Special Actions¶
Important Notes¶
RCON commands are ran as soon as the buyer purchases the package, for this reason it is recommended that you DO NOT use commands that require the user to be connected to the server, as they will not work if the user is not connected to the game server when they are making a purchase. Test commands using the “Test Server” button to see which commands work. Use “Custom Command” instead of “RCON Console Command” if the Sourcemod plugin is installed.
MySQL Query¶
Warning
Only use this if you absolutely know what you are doing, incorrect usage of this command can have very bad side effects. If you need help with this create a support ticket on [ScriptFodder](https://scriptfodder.com/scripts/view/2168).
Perform a query on a MySQL database.
Parameters:
- DB Host - The hostname the MySQL server is running on
- DB Name - The name of the database
- DB Username/DB Password - The username and password of the user used to access the database
- DB Query - The query - you can use prepared values by replacing values to prepare with a
?
- DB Prepared Values - The values to be prepared, seperated by a
|NEWVAL|
Common Errors¶
My package doesn’t show up in my store even though it’s enabled!¶
Make sure your package has at least one command added, then make sure that command has your server enabled. A package won’t show up for a server if it has no commands enabled for that server.
PayPal Error 10002 - Security header is not valid¶
Your PayPal API credentials are incorrect, follow the instructions in Setting Up PayPal again.
I’ve enabled Maintenance mode and now I can’t disable it!¶
Go to http://yourdomain.com/folder/login.php, or if you are using the one-click hosting and setup this will be at https://sdonate.com/stores/<yourdomain>/login.php. When you have logged in, go to http://yourdomain.com/folder/dashboard.php (https://sdonate.com/stores/<yourdomain>/login.php if using free SDonate hosting).