[TF2 Stats] With Web Ranking and Item Logger [v9.1.0]
1 Attachment(s)
[TF2] Ranking and Item Logger Plugin Version 9.1.0 See next post for update info. Based on code from This Ranking Plugin. All credit for original plugin goes to it's original authors. IMPORTANT NOTE: I am currently not supporting this plugin as it is in dire need of a full rewrite. Description:Others have released updated versions near the end of this thread, use at your own risk. !SEE NEXT POST FOR SITE UPDATE INFO! This is a TF2 ranking plugin with support for a web interface mysql, and multiple servers.Need Help? Use IRC! You can join #tf2stats @ irc.gamesurge.net if you want to talk to me about updates, bugs, etc.Join the TF2 Stats Plugin Steam Group! Update notices and whatnot will be posted here, plus it shows your support! http://steamcommunity.com/groups/TF2StatsPlugin Chat Commands: "rank" to display your rank to the server.Admin Commands: sm_rankadmin - opens the rank admin menuCvars: sm_tf2_stats_version - shows the plugin versionInstall Instructions:
Click here for Detailed instructions! (Thanks eraserhead!!) Database.cfg: Code:
"tf2stats" The server needs to be restarted for the database.cfg to be reloaded Notes: Make sure to allow your gameserver's IP to access your mysql database.ToDo: ~Credits: Plugin, and original web interface to their respective authors. Web Version History: Plugin Version History:
See next post for update instructions (major updates only). Total lines of code: 8,465 Total downloads: 7,720 Author Note: I will not help you set up and configure your database user permissions. Only you can allow your gameserver access to your database. Only you can prevent forest fires. |
Re: TF2 Stats With Web Ranking and Item Logger
When Updating:
To edit the database:
If deleting a player record, that player's record will not be recreated until they connect again. FAQ: I'm going to start a FAQ here for questions that get asked far too often. These are mostly going to be for MySQL setups since SQLite is more or less foolproof. Please read before posting! Always make sure you are running the latest versions before reporting problems. They may have already been fixed!
Moving to MySQL from SQLite: I do not support doing this any more, but you are welcome to try on your own.
Note: Due to structure differences in the SQLite and MySQL database versions, you will have to do an INSERT INTO VALUES statement. You may be able to generate the required SQL by first importing in to intermediary database, exporting, and re-importing. |
Re: TF2 Stats With Web Ranking and Item Logger
The only thing you changed was the item found on webpage right? The database was already getting the hats? I thought in doing this same thing, since it would be very easy, but someone posted a ver better stats page and plugin (in beta phase), and I'd rather waiting for that...
|
Re: TF2 Stats With Web Ranking and Item Logger
Only problem i have is
Code:
Warning: include(inc/names.inc.php) [function.include]: failed to open stream: No such file or directory in /home/fhlinux209/e/evil-dragon.co.uk/user/htdocs/tf2server/top10.php on line 3 |
Re: TF2 Stats With Web Ranking and Item Logger
@Evil-Dragon
Thanks for catching that, I fixed it in V6.0.1 You can also create a blank text file in /inc/ called "names.inc.php" that will fix it. |
Re: TF2 Stats With Web Ranking and Item Logger
Thanks, i figured it out to add a blank file in the end. :)
Suggestion: Also add a tf2items backpack link to the userpage under Steam Community? Format is http://www.tf2items.com/profiles/xxxxxxxxxxxxxx (where xxxxxxx is the steam userid) |
Re: TF2 Stats With Web Ranking and Item Logger
Yea I'm planning to add that once I figure out how to calculate profile ids from steam ids.
-Added to todo list |
Re: TF2 Stats With Web Ranking and Item Logger
Will this help?
Code:
<?php function steam2friend($steam_id){ It took me a while to get it working with my limited knowledge of php. :D Also there appears to be a problem with the statistic "Intel Captured" it is recording one for every player on red/blu whenever someone else captures the intel. |
Re: TF2 Stats With Web Ranking and Item Logger
I starting using this last night and it seems to works, it logs the stats and everything but the only thing I'm having problems with is that I get this at the top of the page.
Code:
Warning: include(inc/names.inc.php) [function.include]: failed to open stream: No such file or directory in /home/assas651/public_html/TF2 Ranking/index.php on line 3 |
Re: TF2 Stats With Web Ranking and Item Logger
Quote:
It's fixed now, grab a new copy :) |
Re: TF2 Stats With Web Ranking and Item Logger
great to see someone pick this up... r-rehl has started chasing women and lost interest in development... i asked him about it a while back...
i have one request... I run a bot server, and the bots all score to one account, so in 1 day they will amass over 100000 points, and take fiorst place unless i delete the account every day... I was wondering if u could put a fake client check into the code to stop the database from recording points for the bots. I still want the players to get kill points for killing the bots, just no score for bots killing/capping etc. also, on that note, it would be cool if there was a cvar for adjusting the points awarded for a bot kill... sm_bot_point_ratio 1.0 or something similar... the bots are less of a challenge than a real player, so i would like to give 1/2 points for killing a bot... As always i am willing to guinee-pig any development u may do before release (i did this for r_rehl as well) pm me if u are interested in a windows dedicated server for testing, i have several. thanx in advance |
Re: TF2 Stats With Web Ranking and Item Logger
Well at the moment I'm trying to avoid updating the plugin, although I'm keeping a list of changes that need to be done.
If you want, I can add a check to the php web form so that bots don't show up on the rankings... I could have that done in a day or two, let me know :wink: |
Re: TF2 Stats With Web Ranking and Item Logger
thanx... but im afraid that wont do it... i need to block their score from being written to the database...
but i do appreciate you answering me so fast... thanx anyway... guess i can go back to pestering the author... lol... he said he would do it for me someday... but someday has yet to come... lol |
Re: TF2 Stats With Web Ranking and Item Logger
Alright, I'll see about editing the plugin shouldn't be to hard... hopefully.
I'll see if I can do it this weekend. |
Re: TF2 Stats With Web Ranking and Item Logger
u rock, man!! + Karma!!
hope i not being a pest.. was not my intention :) |
Re: TF2 Stats With Web Ranking and Item Logger
Did that code help with translating the steam ids into community id's?
Btw, i've had this working for a while now at: http://www.evil-dragon.co.uk/tf2server/index.php Works nicely. |
Re: TF2 Stats With Web Ranking and Item Logger
To be honest I haven't tried it yet, L4D2 kinda ate up all my free time for the last week :nono:
I'd like to get the steamID calculation and bot check added to the site/plugin this weekend hopefully |
Re: TF2 Stats With Web Ranking and Item Logger
Could you add support to translations on the plugin?
I've made a custom webinterface in portuguese, but I don't want hard code the plugin translation |
Re: TF2 Stats With Web Ranking and Item Logger
Quote:
If you're asking for a setting in a config file what would let you toggle language settings, I could do that fairly easily. However I would rather have multi-language support so people can click a flag at the top of the page to change the language (or something like that). I'll see about adding that soon-ish... Coming soon-er-ish (hopefully tonight) will be a bunch of client profile controls:
|
Re: TF2 Stats With Web Ranking and Item Logger
I just want the translation support on the PLUGIN...
|
Re: TF2 Stats With Web Ranking and Item Logger
Quote:
|
Re: TF2 Stats With Web Ranking and Item Logger
Rewrote some php to calculate Steam Community IDs without requiring php extensions.
Translation: Steam community links will work anywhere the web interface does. Should have a new version tonight. |
Re: TF2 Stats With Web Ranking and Item Logger
u r a god among men!!
|
Re: TF2 Stats With Web Ranking and Item Logger
Got all the stuff I wanted working:
http://content.screencast.com/users/...11-25_2209.png Not sure I like the button styles though, going to see about changing them possibly. Also I'm going to add some configuration settings for the Custom Achievements button to enable/disable it, and set the file path. Custom achievements plugin if you weren't aware of it: http://forums.alliedmods.net/showthread.php?t=109397 Gonna take a break, then finish this up and post it :o ~edit: If you want to see the page, take a look at the demo link on the first page :up: |
Re: TF2 Stats With Web Ranking and Item Logger
Bumpity, updated to include steam links etc. :up:
A preview of the new buttons is viewable on the first page (I changed the style from the ones above). I included the red and black buttons too if anyone wants to use them. :wink: |
Re: TF2 Stats With Web Ranking and Item Logger
What about best of each class, like this concept: http://forums.alliedmods.net/showthread.php?t=71196
Also, he has a nice and sexy concept of design to the webpage... It seens he abandoned the project... =( |
Re: TF2 Stats With Web Ranking and Item Logger
Hey DarthNinja,
I'm giving your stats plugin a go in lieu of HLStatsX. :D Question, I run w/ S-TV on. A chance this might make things wonkey? Maybe ignore bots in stats, but still list it on the Player List for Online Players? Thanks Edit: I keep getting on the Main Page: DB query failed. I have triple checked everything, but I'll just lay it out just in case. Gameserver is @ IP1:27015 1. databases.cfg Quote:
TF2 stats host is @ IP2 1. I've created the db, user, password, provided full access to the db. 2. The Gamerserver IP1 has been allowed and my host checked that connection the db was successful. 3. Settings.php Quote:
|
Re: TF2 Stats With Web Ranking and Item Logger
Quote:
Thanks! No issues whatsoever at all. |
Re: TF2 Stats With Web Ranking and Item Logger
So I want to host the webstats on my website server, I setup an db for the stats. Im still getting an sql error. I notice in tf2-stats.cfg there is a place for webinterface settings, do I add the correct settings? if so which file do I direct it to?
SOrry for the noob questions just trying to clarify. |
Re: TF2 Stats With Web Ranking and Item Logger
Quote:
Quote:
What you need to do is:
If the web interface can't connect to the database, it could be because the db settings are incorrect in the settings.php include, or because the correct tables don't exist in the database (make sure the plugin is working). |
Re: TF2 Stats With Web Ranking and Item Logger
Thank you for the reply
Here is what I'm seeing missing and causing all the confusion. 1.The database.cfg - use the settings shown if adding to the same server as TF2 is running on, other wise you will need to add your web sql info if hosted elsewhere. i.ee I host at hostmonster.com. you will also need to add i.e. gameservers ip your remote sql list (found in cpanel) *Please correct me if I am miss informed. 2. The web interface/inc/settings.php - I assume since I am hosting with hostmonster I add my sql db info in there as well - so same info for both database.cfg and settings.php? 3. tf2-stats.cfg - besides changing the points there is a setting for enabling webinterface: // :: Webrank Configuration rank_webrank "0" rank_webrankurl "" *does this get edited as well?? Also I noticed that the .smx does not show in my loaded plugins listing - sm plugins list (yes I stopped and restarted the server) Any help would be grateful. |
Re: TF2 Stats With Web Ranking and Item Logger
Ignore tf2-stats.cfg.
Here is an example of a correct config using mysql: "tf2stats"You would use the same settings for the settings.php file, except you would use localhost rather then the server IP. (Assuming you have the database and the website on the same server). If the plugin is not running you have to fix that first. Refresh your server's plugins, if it's not loaded, check for errors. If it says something like "IP1 is denied access to database on IP2" then you need to unblock "IP1" and allow it to edit the database. If you refresh the plugins and there are no errors and the plugin still isnt loaded, then you probably installed it wrong. |
Re: TF2 Stats With Web Ranking and Item Logger
Ok I have it setup as you stated. I'm still not getting the pluggin loaded so I'm guessing thats more the issue. However the when you say error I assume you looking in the tf2 logs?
Also with cpanel remote sql option you cannot add a port # only the ip could that be causing any issues? Also can you install the .smx file wrong lol? I just placed it were it said to go addons/sm/plugins/.... here is my site link Code:
http://www.shadowcompanyelite.com/tf/tf2stats/ Failed to connect: [2003]: Can't connect to MySQL server on '74.220.*.*' (110)- (I edited the ip on here only) L 12/01/2009 - 14:18:34: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4) L 12/01/2009 - 14:18:34: [SM] Displaying call stack trace for plugin "n1g-tf2-stats.smx": L 12/01/2009 - 14:18:34: [SM] [0] Line 2797, G:\Users\Raphael\Desktop\Neuer Ordner (4)\TF2-Stats-V5.0\plugin\tf\addons\sourcemod\scripting\n1g-tf2-stats.sp::createdbtables() L 12/01/2009 - 14:18:34: [SM] [1] Line 179, G:\Users\Raphael\Desktop\Neuer Ordner (4)\TF2-Stats-V5.0\plugin\tf\addons\sourcemod\scripting\n1g-tf2-stats.sp::OnPluginStart() |
Re: TF2 Stats With Web Ranking and Item Logger
Ghost and DarthNinja,
Going to try and help here after I've read what is going on. I may have some redundant steps, but I hope it is just step-by-step for you to follow. Main thing is whether Hostmonster allows outside conncections to the mysql. afaik, the gameserver is wide open b/c anyone can join it to play. :D So here goes... Let me see if I can lend some assistance here. You are hosted on hostmonster.com, so assuming they allow an IP to access your mysql, these would be your basic steps from Cpanel 1. Create a new mysql database -- ghoststats 2. Create a user for the database -- username: ghostuser password: pass 3. Add ghostuser access to ghoststats database, grant ALL privs 4. Click on phpmyadmin to confirm the mysql exists 5. Click on Remote Mysql icon from Cpanel -- enter the IP address of your game server. You might have to enter "%" Website setup, using your link = .../tfstats/ 1. You would have uploaded the all the contents of the zip file (TF2 Ranking Web Interface v6.5.1.zip) to /tfstats/ folder. 2. Only file to edit is /tf2stats/inc/setting.php Using the same info I provided above Code:
$mysql_server = "localhost"; On the gameserver, assuming you have SM installed correctly and working: 1. All you need is the *.smx file be placed in Code:
..addons/sourcemod/plugins/n1g-tf2-stats.smx Code:
..tf/cfg/tf2-stats.cfg Editing the databases.cfg file located in Code:
/addons/sourcemod/configs/databases.cfg Code:
"tf2stats" Log files are located Code:
addons/sourcemod/logs Then do a full stop on the game server, then a Start. Sometimes a restart doesn't trigger things. |
Re: TF2 Stats With Web Ranking and Item Logger
Remember that when unblocking the game server's IP, the IP you need to unblock may not be the same as the one you connect to.
eg: My server IP is 216.6.235.204 However the IP I have to unblock is 216.6.235.2 If you have that problem, the db server should return "access denied for IP blah blah blah". The 'denied' IP is the one you need to unblock. Right now your problem is that the game server cant connect to the web server, reading the setup instructions again, or what MjrNuT posted above would be a good place to start. |
Re: TF2 Stats With Web Ranking and Item Logger
well all my settings match watch should be correct.
Quote:
So this leaves me with 2 issues. 1. my remote sql connect thru cpanel(hostmonster) isnt unlocking the ip for gameservers. Im wondering since gameservers assigns a :port# if that will mess with things since the remote sql can only add an ip address without port 2. the smx isnt loading as a plugin, I assume it would be called n1g-stats something on my running plugin list, the only other reason I can think of is due to not being able to connect to the db before loading. * I was reading with hostmonster and other hosting companies they are on a shared ip address, it still should be considered static but another thought.. Thanks for all the help so far:) |
Re: TF2 Stats With Web Ranking and Item Logger
If the plugin is loaded it will show up using "sm plugins list" as ""TF2 Stats" (5.0) by R-Hehl".
If it is not loaded, you should see a startup error at the bottom of the list, and hopefully a reason for the error, such as 'access denied'. You can try using * as a wildcard also, but the plugin should tell you the response from the mysql server which would have the IP the game server is using. If you still can't get it unblocked I would recommend talking with your hosting company's tech support... |
Re: TF2 Stats With Web Ranking and Item Logger
OK for furture questions remote sql to get the % must be added as a sub c so i.e. 8.23.237.0/24 will give you 8.23.237.% which will cover the ip range.
|
Re: TF2 Stats With Web Ranking and Item Logger
Well that fixed it 99% I would recommend for the adding that to the instructions if your web interface is hosted elsewhere.
MrjNut that was a great write up!! Here is the last problem: Warning: Cannot modify header information - headers already sent by (output started at /home1/shadowc1/public_html/tf/tf2stats/inc/footer.inc.php:7) in /home1/shadowc1/public_html/tf/tf2stats/index.php on line 9 |
Re: TF2 Stats With Web Ranking and Item Logger
1 Attachment(s)
Quote:
|
All times are GMT -4. The time now is 07:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.