Raised This Month: $7 Target: $400
 1% 

[TF2 Stats] With Web Ranking and Item Logger [v9.1.0]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
1274
Plugin Version:
9.1.0
Plugin Category:
Statistical
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    83 
    Plugin Description:
    TF2 Stats: Easy installation, optional online multi-server database and web interface!
    Old 11-12-2009 , 04:38   [TF2 Stats] With Web Ranking and Item Logger [v9.1.0]
    Reply With Quote #1

    [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.
    Others have released updated versions near the end of this thread, use at your own risk.

    !SEE NEXT POST FOR SITE UPDATE INFO!
    Description:
    This is a TF2 ranking plugin with support for a web interface mysql, and multiple servers.
    It can operate in one of two modes:
    "Simple" which requires very little setup work.
    "Web" which requires more work but is well worth it. Supports multiple servers and a web interface if so desired.

    Requirements:
    • 'Simple' mode:
      • One server (you can run more then one server like this but they will not share stats)
    • Multi-server / web interface mode
      • One or more servers.
      • Web server with MySQL and php support.
      • Ability to allow remote access to MySQL databases. (see below).
    Need Help? Use IRC!
    You can join #tf2stats @ irc.gamesurge.net if you want to talk to me about updates, bugs, etc.
    If you don't have an irc client, you can join by clicking here.
    Please note: I'm not going to walk you through setting up the plugin, there is documentation for that.

    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.
    "top10" to view the top 10 ranked players.
    "players" to view a list of ingame players.
    "webrank" to get your webrank
    "webtop" to get the webtop
    "session" to get information about your session
    "hidepoints" to hide the points you get
    "unhidepoints" to show the points you get

    Admin Commands:
    sm_rankadmin - opens the rank admin menu
    rank_givepoints <client> <value> - give points client(s)
    rank_removepoints <client> <value> - remove points from client(s)
    rank_setpoints <client> <value> - sets the client's points to <value>
    Cvars:
    sm_tf2_stats_version - shows the plugin version
    See tf2-stats.cfg for complete list
    Install Instructions:
    • Simple:
      1. Upload the .smx file to your /sourcemod/plugins/ folder
      2. Set point settings in tf2-stats.cfg and upload to your /tf/cfg/ folder.
    • Advanced + Web Interface:
      1. Edit your game server's database.cfg file located in /addons/sourcemod/configs and add the values shown below.
      2. Install plugin as above.
      3. Restart your game server.
      4. Edit settings.php (in the "inc" folder).
      5. Run the SQL files located in the website zip in your destination database.
      6. Upload web interface to desired location.

    Click here for Detailed instructions!

    (Thanks eraserhead!!)



    Database.cfg:
    Code:
    "tf2stats"
    {
        "driver"            "mysql"
        "host"                "127.0.0.1"
        "database"            "tf2_stats"
        "user"                "tf2st_usr"
        "pass"                "dbpassword"
        //"timeout"            "0"
        "port"            "3306"
    }
    Note:
    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.
    Me, for general updates, bug fixes and improvements to the web interface and any future updates.
    I accept no credit whatsoever for the work done by R_Hehl (aka R5053), Smokestormx, or anyone else.

    Web Version History:
    • Pre V6.0.0
    • V6.0.0
      • Added item support for hats (including spiffy icons!)
      • Fixed player names with non-standard characters displaying incorrectly.
      • Fixed various layout/graphical bugs/inconsistencies.
      • Added code to display "last played" time in 12 hour format instead of 24 hour.
      • Added the ability to set a dynamic website title.
    • V6.0.1
      • Fixed minor bug with nonexistent include file.
    • V6.5.1
      • Added steam community calculation and various related links.
    • V6.5.2
      • Hopefully fixed bug with php header (awaiting feedback)
    • V6.5.5
      • Fixed a SQL injection exploit. (Thanks to michaelh).
      • Fixed steam community id calculations for some people that were having bugs (Thanks Sobuno).
    • V6.6.0
      • Added support for new weapon kill statistics.
      • Better, more accurate naming of items.
    • V6.7.0
      • Remade all kill icons
      • Added new founditem icons for new weapons/hats, etc
      • Updated founditems list
    • V7.0.0
      • Complete rewrite by galadril!
      • Added missing items and weapons
    • V7.0.1 (Galadril)
      • Top10 Page: Top 10 maps are now ordered by points and playtime.
      • Top10 Page: Changed the playtime column.
      • Changed the player page to show the top 3 classes per player.
      • Changed headshot calculation so headshot percents are calculated from kills with weapons that can headshot, not all weapons.
    • V7.0.2 (DarthNinja)
      • Changed map, map_ranking, & top10 pages to show times in am/pm.
      • Replaced periods in dates with slashes on all pages, eg: (03.09.2010 -> 03/09/2010).
      • Added new offset setting in settings.php to fix servers with un-synced clocks
      • "Last Connect" now shows on 2 lines: Date / Time.
    Plugin Version History:
    • V5.0
      • Same as posted here (No changes)
    • V6.0
      • Added new weapons from the soldier/demo update:
        rocketlauncher_directhit, pickaxe, taunt_soldier, sticky_resistance, sword, demoshield, taunt_demoman.
      • Added excluded weapons:
        deflect_flare, telefrag.
      • Fixed headshot tracking. (Thanks Sobuno)
    • V6.1
      • Hopefully fixed sqlite errors with the new weapons. (Thanks Sobuno)
    • V6.3
      • Added rank_ignorebots cvar to allow for blocking/unblocking bots from getting points
      • Changed plugin file name from n1g-tf2-stats.smx to TF2_Stats.smx
    • V6.4
      • Fixed bots getting points for killing buildings and capping points (rank_ignorebots).
      • Added kill tracking for "tribalkukri" (Tribalman's shiv).
      • Added kill tracking for "battleaxe" (Scotsman's skullcutter).
      • Added kill tracking for "ball" (Sandman baseball).
      • Added kill tracking for "paintrain" (Pain Train).
      • Added kill tracking for "sledgehammer" (Homewrecker).
      • Added kill tracking for "unique_pickaxe" (The Equalizer when player has less then 25 health).
      • Added kill tracking for "tf_pumpkin_bomb" (Pumpkin Bombs).
      • Added check to prevent running an old version alongside a new version (file check).
    • V6.5
      • Not released: Changes rolled into V6.6.
    • V6.6
      • Added kill tracking for:
        • Goomba Stomp (Mod)
        • The Lugermorph
        • The Big Kill
        • The Frontier Justice
        • The Wrangler
        • The Gunslinger
        • The Southern Hospitality
        • The Blender Taunt (Gunslinger Taunt)
        • The Guitar Taunt (Frontier Justice Taunt)
      • Fixed bots getting points for killing buildings (hopefully)
      • Now logs players' last used IPs
      • Changed all cvar descriptions (ingame) for easier reading
      • Reorganized handles and cvars in code (nothing you will notice).
      • Added some more mysql/php/html filters to player names.
      • Fixed incorrect building IDs
    • V6.6.1
      • Fixed kills with sentries not being tracked (bug introduced V6.5).
      • Now the plugin tracks kills per sentry level, as well as total sentry kills.
    • V6.6.2
      • Fixed issue an caused by a query buffer being too small and preventing players from being added to sqlite databases. Thanks InflatableSoulmate|BoC !!
    • V6.6.3
      • Added missing reflect_flare cvar
      • Fixed an apparent issue with mysql and UTF8 (Special-char names are now stored correctly).
    • V6.6.4
      • Corrected typo with reflect_flare cvar [Now: rank_deflect_flarepoints].
      • Tweaked the kill code related to bots.
      • Slightly changed the connect text. (Now "[Rank X out of X]" vs "[Rank X of X]" before).
    • V6.6.5
      • Pushed properly indented source code
      • Updated webrank and webtop chat commands to work with new website
      • Made the chat output look nicer, and give better info! See <this post> for more info!
      • Added full list of cvars with notes to the cfg!
      • Added new cvar: rank_connectcountry
    • V6.7.0
      • Added support for the following polycount weapons:
        • The ShortStop
        • The Holy Mackerel
        • The PowerJack
        • The Degreaser
        • The Vita-Saw
        • The Eternal Reward
        • The L'Etranger
      • Latest copy of GeoIP.dat is now included with the zip.
    • **V7.0.0**
      • Added the rest of the polycount weapons:
        • The Black Box
        • The Sydney Sleeper
        • The Bushwacka
        • The Gloves of Running Urgently
      • Added the Frying Pan
      • Added the Engi's Mech-Hand Combo-kill
      • Custom sounds can now be used for the connect sound.
      • Added a second connect sound that plays when a player on the Top10 list joins the server (see cvars).
      • Kills and deaths are now tracked on a per-class basis as well as total.
      • Medic healing is now tracked, the value is updated when the medic dies.
    • V7.0.1
      • Prevents top10 sound from being added to the downloads table if disabled.
      • Top10 sound is now disabled by default until I can figure out why it plays at random
    • V7.1.2
      • Added Horseless Headless Horsemann's HeadTaker Axe
      • Fixed the top10 connection sound playing for random people.
    • V7.4.7 - Adds 1,271 lines of code
      • Added tracking for iron_curtain
      • Major fixes for SQLite databases
        (This update will repair any previous "NULL" field issues)
      • Changes to roundend actions to prevent chat spam (See next post)
      • New chat triggers!
        • kdeath/kdr - Shows players overall kill/death ratio
        • kd<class> - shows KDR for that class
        • lifetimeheals - shows total HP healed
        • More chat triggers
      • VIP System (see next post)
      • Revamped rank_admin menu with options to give/remove points
      • Commands to add/remove/set players' points
    • V7.4.8
      • Fixed a minor bug related to maxplayers
      • Fixed a longstanding error related to AskPluginLoad
    • V7.5.0 - Adds 352 lines of code
      • Adds support for the 12 new Christmas Update weapons:
        • Candy Cane
        • Boston Basher
        • Back Scratcher
        • Ullapool Caber
        • Loch-n-Load
        • Claidheamh Mòr
        • Brass Beast
        • Warrior's Spirit
        • Fists of Steel
        • The Jag
        • The Amputator
        • Crusader's Crossbow
      • Changed rank_admin command to sm_rankadmin
      • Improved Sandvich-steal tracking code
      • Fixed rank_showranktoall being ignored (Thanks Lob)
      • Added Sandman stun tracking code (Thanks heffebaycay)
    • V7.6.2 - Adds 170 lines of code
      • Fixes tracking for the following weapons: BlackBox, Sydney Sleeper, Brass Beast, Bushwhacka, Claidheamh Mòr, Crusaders Crossbow, Warrior's Spirit, Gloves of Running Urgently, and the Loch 'n Load.
      • Adds tracking for Mini Sentries and Ullapool Explosions
      • KDR commands now respect the rank_showranktoall cvar
      • Fixed a crash that could happen if someone set the sound file to "" for the connect sound
      • Added rank_ignoreteamkills to prevent tracking of team-kills
      • Stun cvars are now included in the config file.
    • V7.6.5 - Adds 56 lines of code
      • Adds tracking for the soldier's grenade taunt when he has the worms hat equipped (aka taunt_soldier_lumbricus).
      • Fixed a minor bug where the plugin would try to get the team of client 0 (console)
      • Fixed a typo in the cfg (Hi xomp!)
      • Note: plugin version will show 7.6.4, not 7.6.5 (oops!)
    • V7.6.8 - Adds 72 lines
      • Add the rift promo items (Sun-on-a-Stick and Sharpened Volcano Fragment)
      • Added bonus points for headshots
    • V7.6.10
      • Fixed crappy code related to chat hooks
      • Plugin will now respond to triggers in public and team chat
      • Plugin will no longer respond to gagged players
    • V7.7.0 - Adds 102 Lines - さむらい
      • Added support for the weapons added in the Samurai Update:
        • Half-Zatoichi Katana (demokatana)
        • Fan O'War (warfan)
        • Conniver's Kunai (kunai)
      • Increased the Spy's point cvar values slightly
      • Latest version of GeoIP.dat (March 1st) included in the zip.
    • V7.8.0
      • Added support for the Witcher and Red Faction: Armageddon promo items:
        • The Three-Rune Blade
        • The Maul
    • V7.8.1
      • Quick database version fix, was not updated in version 7.8.0.
    • 8.0.1 - The Über Update - Adds 368 lines
      • Fixed a sql query issue reported by SonicSNES.
      • Plugin now checks /cfg/ and /cfg/sourcemod/ for its config file.
      • Added tracking for the weapons from the Über Update:
        • The Soda Popper
        • The Winger
        • The Atomizer
        • The Liberty Launcher
        • The Reserve Shooter
        • The Disciplinary Action
        • The Market Gardener
        • The Mantreads
        • The Detonator
        • The Persian Persuader
        • Splendid Screen Shield Charge
        • The Tomislav
        • The Family Business
        • The Eviction Notice
        • The Overdose
        • The Solemn Vow
        • The Bazaar Bargain
        • The Shahanshah
        • The Enforcer
        • The Big Earner
      • The June 2011 version of GeoIP.dat is included with this update.
    • V8.1.2 - Adds 104 lines
      • Added the Summer Update weapons:
        • The Postal Pummeler
        • Nessie's Nine Iron
      • Cvar rank_show has been renamed to rank_show_on_connect to more accurately reflect what it does.
      • Fixed an extra case where messages were still shown on connect.
      • You can now set rank_connectcountry to 0 to disable the printing of players' countries
      • New cvar rank_show_player_count_notice added to enable/disable printing of "Ranking enabled/disabled" player-count messages.
      • Bots will now show their country as "Localhost" rather then "Unknown".
    • V8.1.4
      • Fixes VIP kill text being printed to all players
      • Fixes a SQL error SQLite users would get when a new player joins and would prevent that player's record from being created.
    • V8.3.1 - "Star Wars" Update
      • Added tracking for the Victory Pack (aka "Star Wars") weapons:
        • The Cow Mangler
        • The Righteous Bison
      • Fixed points not being printed if the points were 0, but a bonus was added
      • Added a time offset cvar to the plugin to allow tweaking "last seen" times at the server level.
      • IPAddress database field has been bumped from 17 to 50 characters in length to support IPv6
      • Updated descriptions for CP/CTF cvars
      • CTF Tracking Changes:
        • Plugin can now give points to the capping player instead of/in addition to the whole team (cvar added).
        • Plugin now counts intel captures only for the capping player, not the entire team.
        • Added admin command to reset all "number of times capped" records (rank_debug_resetallctfcaps)
      • CP Tracking Changes:
        • Plugin can now give points to the capping player(s) instead of/in addition to the entire team (cvar added).
        • Plugin now counts captures only for the capping player(s), not the entire team.
        • Added an admin command to reset all "number of points capped" records (rank_debug_resetallcpcaps)
        • Added pl_ and plr_ maps to the list of game types that have control points.
        • Fixed a bug preventing the correct tracking of blocked CP captures.
      • Minor grammatical fixes for ctf/cp cap notices
      • Added a cvar to disable the round start/end messages
    • V8.4.2 - QuakeLive Update
      • Added tracking for weapons from the QuakeLive Update:
        • The Original
      • Added a check in RankPanel(); to prevent an error related to clients who are not ingame
      • Fixed an error in FlagEvent(); related to clients who are not ingame.
      • Added tracking for the number of players that have used a player's teleporter.
      • Added points for teleporting players.
    • V8.5.3 - Deus Ex
      • Added missing cvars to the cvar file
      • Added tracking for reflected Mangler projectiles.
      • Added tracking for the Deus Ex promo items:
        • The Widowmaker
        • The Short Circuit
        • The Machina
        • The Machina (Double Kill)
        • The Diamondback
      • Plugin will now log an error and enter a fail state if it cannot connect to a database.
      • Global KDR command now counts assists as 1/2 a kill.
      • Default teleporter-use points dropped from 2 to 1.
      • Healing is now updated for every death, not just medic deaths.
    • V8.6.0
      • Fixes item tracking with the new event data.
      • Plugin now logs extra data from the found item event:
        • Item Index (Replaces item name)
        • Quality (vintage, genuine, etc)
        • Method (found, crafted, etc)
      • Adds an index to the Players table for the Points column.
    • V8.7.0 - Halloween 2011
      • Tracking added for the following weapons:
        • The Conscientious Objector
        • The Scottish Handshake
        • The Unarmed Combat
        • The Wanga Prick
        • The Saxxy
      • Added tracking for Monoculus stuns!
      • Added tracking for Monoculus kills!
      • Plugin now prints to the error log file when disabling a very old version of itself using on old filename.
      • Added support for using exclamation marks in front of chat commands.
      • Fixed a problem relating to point captures where the plugin would ignore the value of rank_pointmsg and always print points earned.
      • Plugin will now ignore fake item_found events fired by the [TF2] Fake Item Messages plugin.
      • Pushed the November 1st update of GeoIP.dat.
    • V8.9.0 - Christmas 2011
      • Added tracking for the following weapons:
        • The Phlogistinator
        • The Manmelter
        • The Third Degree
        • The Holiday Punch
        • The Pomson 6000
        • The Eureka Effect
        • The Sharp Dresser
        • The Spy-cicle
      • Change default point values for:
        • Deflected Cow Mangler (3 -> 8)
        • Knife (3 -> 4)
      • Pushed the December 6th update of GeoIP.dat.
    • V8.10.1
      • Fixed tracking of found items (for reals this time)
    • V8.10.2
      • Fixed founditems table not being created in some cases.
    • V8.14.2
      • Connection code rewritten to establish a threaded SQL connection.
      • OnMapStart code has a timer added retry if a database connection has not yet been established.
      • Plugin now uses SQL_ConnectCustom for SQLite connections (Fixes deprecated function warning).
      • Set rank_removeoldplayersdays and rank_removeoldplayers to default to 0 to prevent accidental database pruning if the config file is not read.
      • GeoIP.dat updated to February 7th version
      • Fixed incorrect version numbers in update query checks
      • Added Tracking for:
        • The Black Rose
        • The Wrap Assassin
        • The Apocofists
    • V8.15.0
      • Bumped up version numbers to account for people who's dbversion was too high.
    • V8.15.1
      • Fixed tables not getting created/updated for people using SQLite.
    • V8.15.2
      • Removed a query that SQLite does not support.
    • V8.18.0
      • Added delay timer to rank queries so players cant spam the command (default delay of 5 minutes).
        (This is to prevent overloading large databases when doing COUNT)
      • Bots will no longer be tracked for Sandman stun events or Sandviches stolen.
      • Bots will no longer get points for teleporting players.
      • The connecting player message will no longer be shown when bots join.
      • Player extinguished function completely rewritten.
      • The plugin will now try to reconnect to the database after 15 minutes if the connection is lost.
    • V8.18.1
      • Incorrect if statement ordering
    • V9.0.0
      • Greatly improved !rank command delay.
      • Added tracking for new Meet The Pyro items
    • V9.1.0
      • Added tracking for the Sleeping Dogs items

    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.


    Attached Files
    File Type: zip [TF2] Ranking and Item Logger v9.1.0.zip (819.5 KB, 11429 views)
    __________________

    Last edited by DarthNinja; 03-31-2019 at 10:43.
    DarthNinja is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-12-2009 , 04:38   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #2

    When Updating:
    1. Back up your database (optional but recommended)
    2. Upload new .smx
    3. Configure your cfg with the new cvars as desired
    4. Restart server or reload the plugin.
    5. Run rank_debug_resetallcpcaps and rank_debug_resetallctfcaps commands to reset all CTF and CP cap records in the database.
      This is to clean out old tracking data that really wasn't correct at all.
      Note: These commands will not change any other stored values (eg, point totals).
    -------------------------------------------------------------------------

    To edit the database:
    1. Open your database in phpMyAdmin (Or with This App if you use SQLite) (Example).
    2. Browse to the "Players" table for player ranking data.
    3. Find the record you're looking for and edit it.
    Note: The server will have to be stopped to re-upload the edited sqlite file. MySQL edits can be done live.
    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!

    • Q: I'm getting "mysql_fetch_array():" errors and my site doesn't work!
      A: Some of your database tables are missing. Most likely your Players table.

    • Q: I seem to be missing my "Players" database table, help!
      A: The plugin creates the players table the first time it is run. Install and run the plugin to create the table.

    • Q: Other database tables are missing!
      A: Run the SQL scripts included with the site version you happen to be using.

    • Q: How do I run the scripts?
      A: Using phpMyAdmin or another tool like it.

    • Q: I installed and ran the plugin, but it's not creating the "Players" table.
      A: Your databases.cfg file isn't configured correctly and the plugin has fallen back to using SQLite.

    • Q: I configured my databases.cfg file, but the plugin won't work.
      A: Ether your file is misconfigured, has incorrect information, or your MySQL server isn't allowing your MySQL user to connect from your gameserver's ip.

    • Q:How can I allow my gameserver to access my database?
      A: When you create a database user you will most likely be able to set access restrictions based on IP. You'll need to allow your gameserver's IP access. For more help, contact your web host.

    • Q:I gave my gameserver's IP access, but it's still being blocked.
      A: You have to use your gameserver box's physical IP, not the IP that srcds listens on. The correct IP should be provided in the error TF2Stats will generate.

    Moving to MySQL from SQLite:
    I do not support doing this any more, but you are welcome to try on your own.
    1. Grab your SQLite DB file located at /sourcemod/data/sqlite/tf2stats.sq3
    2. Use this program to open the file export the data from it.
    3. Setup the TF2 stats plugin with MySQL and let it create the table structures.
    4. Import the data *only the data* from the SQLite database.
    If you directly copy the SQLite database to MySQL you will be missing a few columns which will cause plugin errors.

    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.

    Last edited by DarthNinja; 12-20-2011 at 23:24.
    DarthNinja is offline
    Ghost Killer
    Member
    Join Date: Aug 2009
    Old 11-12-2009 , 12:43   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #3

    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...
    Ghost Killer is offline
    Evil-Dragon
    Junior Member
    Join Date: Oct 2009
    Old 11-13-2009 , 16:31   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #4

    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
    
    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
    
    Warning:  include() [function.include]: Failed opening 'inc/names.inc.php' for inclusion (include_path='.:/usr/share/pear/') in /home/fhlinux209/e/evil-dragon.co.uk/user/htdocs/tf2server/top10.php on line 3
    
    __________________
    Evil-Dragon is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-13-2009 , 16:46   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #5

    @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.
    __________________
    DarthNinja is offline
    Evil-Dragon
    Junior Member
    Join Date: Oct 2009
    Old 11-13-2009 , 16:46   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #6

    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)
    __________________
    Evil-Dragon is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-13-2009 , 16:52   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #7

    Yea I'm planning to add that once I figure out how to calculate profile ids from steam ids.
    -Added to todo list
    __________________
    DarthNinja is offline
    Evil-Dragon
    Junior Member
    Join Date: Oct 2009
    Old 11-13-2009 , 16:57   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #8

    Will this help?

    Code:
    <?php function steam2friend($steam_id){
        $steam_id=strtolower($steam_id);
        if (substr($steam_id,0,7)=='steam_0') {
            $tmp=explode(':',$steam_id);
            if ((count($tmp)==3) && is_numeric($tmp[1]) && is_numeric($tmp[2])){
                return bcadd((($tmp[2]*2)+$tmp[1]),'76561197960265728');
            }else return false;
            }else{
                return false;
            }
        }  
    ?>
    I used that in a bit of backend coding i found to translate steam_id's to community id's. You can see it in use here: http://www.evil-dragon.co.uk/itemlog/

    It took me a while to get it working with my limited knowledge of php.

    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.
    __________________

    Last edited by Evil-Dragon; 11-13-2009 at 17:24.
    Evil-Dragon is offline
    Ginxeng
    Senior Member
    Join Date: Nov 2009
    Location: Timber Doodle
    Old 11-16-2009 , 19:02   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #9

    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
     
    Warning: include() [function.include]: Failed opening 'inc/names.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/assas651/public_html/TF2 Ranking/index.php on line 3
    Here is the page if you want to look at it.http://www.assassinsunknown.com/TF2%20Ranking/

    Last edited by Ginxeng; 11-16-2009 at 19:07.
    Ginxeng is offline
    Send a message via AIM to Ginxeng Send a message via MSN to Ginxeng Send a message via Skype™ to Ginxeng
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 11-16-2009 , 22:14   Re: TF2 Stats With Web Ranking and Item Logger
    Reply With Quote #10

    Quote:
    Originally Posted by Ginxeng View Post
    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.
    Thanks, I'd fixed that but stupid 7-Zip (more my fault, but I'd rather blame the program) didn't replace the files when I updated them.

    It's fixed now, grab a new copy
    __________________
    DarthNinja is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 04:14.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode