Addon Details

Watch - Add Favorite


Mani Admin Donations ScreenShot

Does this version work for you?
22
w00ts
w00t!2

Mani Admin Donations - Version 1.3-Rev

posted on 2009-08-14 23:32:45
by Owned|Myself



Description

This addon will allow players to Donate to you for set periods of time for admin without you having to do anything during the Donation Process! How does this work? When a players donation is successful, a MySql database table is created for the player. This contains the time/date of purchase, Steam ID of the player and the Package (Either Basic or Advanced). 2 PHP pages display the Steam ID's dependant on who purchased which package: steam.php and advsteam.php The Server Side Script reads these 2 files when a player joins to compare Steam ID's. If it's a match to 1 of them, the Admin Flags will be added accordingly. ------------- This script allows for Sourcemod Ban Compatibility Also! ------------- [color="red"]Requires:[/color] [color="blue"] ES 2.0+ Mani Admin Plugin 1.2R+ A Paypal Account Donators Webhost that supports MySql and PHP [/color]

Installation

Server Side: 1) Place the "mad" folder in addons/eventscripts 2) Load it Once 3) The CFG (called settings.cfg) should now be created 4) Open up settings.cfg and: Edit: [code] // URL for donations and SteamID Checking. NEEDS TO BE VALID! madurl "http://http://yourdomain.com/mad/"[/code] to the website you are going to use for donations. Edit: [code] // Displays an advert on each round start which shows where to donate for admin madadverts 1 // The colour the Website will be when advertised. **Colours: red, blue, lightgreen, green, default** madadcol "blue" [/code] to your liking. Edit: [code] // ************************************* // *******Sourcemod Compatibility******* // ************************************* // Turn on SourceMod Ban Compatibility. 1 is on, 0 is off. smban 0 // Turn on SourceBans compatibility. 1 is on, 0 is off. sourcebans 0 // Note that these both use the same flags! "SM Ban" and "SM PBan". Replace both the Mani Ban Flags with this. "SM Ban" is Temporary bans and "SM PBan" is Permanent bans as well as temp. Make sure if one of them is set to 1, the other is 0! [/code] should you need to. 5)Now open up mad.py and go to lines 34 and 36. Line 34 is the Basic Admin Flags Line 36 is the Advanced Admin Flags Edit them accordingly. A list of flags can be found in the CFG should you need them later. ***This feature may be edited at a later date*** 6) Add "es_load mad" to your autoexec.cfg without the quotes! Webserver: 1) Upload all the webserver files (excluding the one that says webserver) to any folder you want it in in public_html 2) Create a MySql Database and User for the database (that has full privelidges) 3) Open admin/config.php and edit: [code] //host loaction define("_HOST", "localhost", TRUE); //database username define("_USER", "DATABASE USERNAME HERE", TRUE); //database username`s password define("_PASS", "DATABASE PASSWORD HERE", TRUE); //database name define("_DB", "DATABASE NAME HERE", TRUE); //database table name change this to install multiple version on same database define("_TBL", "mad", TRUE); //This is the email that you will recieve emails when someone signs up. define("_EMAIL", "[email protected]", TRUE); [/code] So it matches your Database Settings. Change the Email to yours. 4)Open validate.php and edit: [code] $usernames = array("admin"); $passwords = array("password"); [/code] Change "admin" to your admin username. Change "password" to the password for that user. To add multiple users do: [code] $usernames = array("admin","admin2"); $passwords = array("password","password2"); [/code] and follow the same steps to edit as above! 5) Go to http://yourwebsite.com/madinstallpath/admin/install.php Replacing "http://yourwebsite.com/madinstallpath/" with your website Path! The tables should now have been created. 6) Delete install.php 7) Now open index.php (not in the admin folder) and Edit lines that look like: [code] &lt;input type="hidden" name="business" value="[email protected]"&gt; &lt;input type="hidden" name="currency_code" value="USD"&gt; &lt;input type="hidden" name="item_name" value="basic admin"&gt; &lt;input type="hidden" name="notify_url" value="http://www.yourdomain.com/CSS/addsteam.php"&gt; &lt;input type="hidden" name="return" value="http://www.yourdomain.com/CSS/index.php?paypal=success"&gt; &lt;input type="hidden" name="cancel_return" value="http://www.yourdomain.com/CSS/index.php?paypal=fail"&gt; [/code] [code] <option value="1">1 Month($5.00) <option value="3">3 Months ($15.00) <option value="6">6 Months ($30.00) <option value="12">1 Year ($60.00) [/code] Edit those accordingly (2 sets to do! one for basic one for advanced) DO NOT CHANGE ITEM NAME! "[email protected]" should be your paypal login. Replace everything that looks like this: http://www.yourdomain.com/CSS/ With what you put as your "madurl" on the settings.cfg for the addon. 6) Now everything should be in order! Try adding someone to the database to make sure. Oh and before I forget! TO ADD SOMEONE MANUALLY TO THE DATABASE: Don't use any Caps for the Admin Level. None at all or it will not work. Just use the spelling that it tells you and it should work! Check http://www.yourdomain.com/CSS/steam.php or http://www.yourdomain.com/CSS/advsteam.php to make sure. (it should show the steam Id you put in.) -------------------------------------- *** NEW FEATURE *** I have added tos.php! This displays Terms Of Service that you want the Player to abide by/know about. This comes with: tosinstall.php, tosconfig.php, tosedit.php, tos_delete.php and tos_save.php in the admin folder. TO INSTALL THIS: STEP 1: Open [color=red]tosconfig.php[/color] and edit that to the same settings as [color=red]config.php[/color] Change one thing on lines 10 and 11: [code] //database table name change this to install multiple version on same database define("_TBL", "mad", TRUE); [/code] Change whats in "mad" to anything other than the one in [color=red]config.php[/color] This will ensure no problems whatsoever. STEP 2: Run the tosinstall.php in your browser (you need to login for this) then delete it after a successful install. And that's it! The Terms of Service Addition should be working smoothly. Check the Example Images to see if yours displays like that. If you have trouble installing, please post on the forum thread asking for help, then detailing your issue.

Version Notes For 1.3-Rev

Updated on: 2009-10-30 18:08:56 EST by Owned|Myself (View Zip Contents)
Revision following reports of players not being removed upon expiration of their Admin Status following last major update. Now it should remove players upon expiry (or manual removal).

( Previous Versions )