General > Developers Corner

Donation Addon for webserver-->Gmod server link?

<< < (2/2)

wjpl:
I am really interested  ;) i managed to create script executing "ulx adduserid" command from a website but I'm a poor coder and it's harder to make the paypal part  :P

// edit: anyway, I managed to do it by myself ;) i set up a blank WordPress blog, removed everything and placed page with a free paypal plugin for this CMS, then modified this plugin to use a srcds_rcon class and contact the server after validating the payment :P a bit lame method, but looks cool and I have the donations in a database :P

Wully616:
That's more or less what I've done wjpl,  my release is standalone though so you don't need to rely on a paypal plugin. I'm glad you got it working :)

I've released mine here: http://forums.ulyssesmod.net/index.php/topic,6524.0.html

wjpl:
http://drgaming.org/donate/ and that's mine, looks pretty much the same but it's "overcomplicated" technical-wise :P

Bite That Apple:

--- Quote from: Wully616 on July 29, 2013, 05:11:03 AM ---Sorry for the bump,

It's been a while but due to family stuff I hadn't had time to start coding the donation system, I'm starting today.
I have been working on a web based player list/ban list/web accessible logs. I'm sure I based it initially off a web based ban system I found on these forums, for the life of me I can't find it now. I have since heavily edited it and added in features which I need, most importantly saving to a MySQL Database.
It was also made in mind to work without any server side addons/modules.



It connects through FTP to the server to download the users.txt and bans.txt file and the current date's ulx log plus 3 previous ones. I hope to make the current day's log live and streaming.

It then parses the users.txt, finding the players name/steamid/ulx group and using the steamAPI I grab the players 64bit SteamID and their avatar and save the all the information to a MySQL database.
It does the same for the bans.txt parsing the playername/steamid/banning admin/ban reason/ban time and getting the players 64bit SteamID/Avatar again and saving it all to another table in the MySQL database.

When a player is added to the database, be it a ban or normal player, it is timestamped with the current day and saved to the database, if an update is attempted again it checks to see if the information is over a day old before updating again.

To save the number of steamAPI calls when it gets the players avatars initially or when updating them it will save them locally on the webserver with the format of their STEAMID.jpg
This is then used in displaying the data and displaying it all in "lovely" tables, forgive me my CSS kinda sucks.

A couple of screenshots
http://gyazo.com/593c7b3876beed89ef3e53f1a49649c4.png
http://gyazo.com/80ee3c5452e073a1a93dc09ddd930507.png
http://gyazo.com/d58d51b07de60c4f531f12f6ae60fc63.png
http://gyazo.com/2401d596f4c9cc91b25372ef40e1b132.png
http://gyazo.com/bd9800964d5ffdc5eab39534f388d1cb.png

You can view the live system here:
http://www.wullysgamers.co.uk/players

As part of the IPN > Server system for donations I am using a slightly modified ingame MOTD to pull players SteamID's from the game.
This is passed through to the donation page which automatically fills out the players SteamID and name, this system works as is, but is not automated.

The live system can be viewed here, with my SteamID64 put in place to show it working
The simple form doesn't only need to be used ingame to work, as long as SteamID64 is passed to it in the URL it will get the users data.

http://www.wullysgamers.co.uk/motd/index.php?steamid=76561197989877834&hostname=Donate


I need to code the listener for the IPN or grab a snippet from somewhere, I'm also going to make it save successful donators to a database for my own reference and to display them on our site somewhere. Once the payment has been verfified by the IPN system I think I will use a php Rcon Client to connect to the server and add the player to the specified rank, unless there is an easier way.

EDIT 30/07/2013:

IPN system is now complete, it connects through rcon from a php script to the web server, the user can successfully donate ingame through the motd and get their rank within a few seconds after the payment is verified through IPN, the donation is saved to a MySQL database with the users email/steamid/ingame name/rank

I will tidy it up and make it more user friendly config and release it ;)

--- End quote ---

This is very nice. I was looking over it, it reminds me of a project that I was doing a long time ago.. that I never quite finished yet.

Navigation

[0] Message Index

[*] Previous page

Go to full version