Raised This Month: $51 Target: $400
 12% 

[L4D] Player Stats (Co-op) v1.1.1


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Plugin ID:
730
Plugin Version:
1.1.1
Plugin Category:
Statistical
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Advanced player ranking and stat tracking for Left 4 Dead Co-op
    Old 01-19-2009 , 01:48   [L4D] Player Stats (Co-op) v1.1.1
    Reply With Quote #1

    Left 4 Dead Stats (Co-op)

    This plugin will enable advanced player ranking and stat tracking on multiple Left 4 Dead servers. Unlike other ranking plugins which emphasize personal awards and advancement, L4D Player Stats awards players both for personal achievements as well as Team goals. Working as a team is more rewarding than simply getting the most kills!

    If you have any ideas, suggestions, or issues - Please post them!

    And yes, L4D Survival and Versus stats are coming VERY soon!

    Requirements
    • PHP (5.0 is recommended, older versions may work but are NOT supported!)
    • MySQL (5.0 is recommend, older versions may work) (*** External connections required if your MySQL server is not on the same system ! This is not enabled by default, you may need to contact your host! ***)
    • Existing MySQL database
    • Metamod: Source/SourceMM (Latest Version)
    • SourceMod (1.2 Latest Build)
    • Clientprefs extension
    Installation
    • Edit the config.php file with the database information for your MySQL database. Upload the webstats files to your web space.
    • Run the createtable.php script from a web broswer. Delete this file if the tables are created successfully.
    • chmod 777 the /templates/awards_cache.html file. Not doing so may cause the Awards cache not to run properly!
    • Upload the plugin to your /addons/sourcemod/plugins/ directory on your game server.
    • Edit your databases.cfg file and add a section with the following information:
    PHP Code:
    "l4dstats"
    {
        
    "driver"              "mysql"
        "host"                "your_host"
        "database"            "your_db"
        "user"                "your_user"
        "pass"                "your_pass"


    • Restart your game server for the changes to take effect.
    • Confirm that stats are running by joining your server and saying "rank" in chat. If a rank panel shows up, congratulations! L4D Stats have been installed successfully.
    Updating / Upgrading
    • Upload the latest version of the plugin to your game server. No changes should be necessary to any config files.
    • Backup your previous webstats installation, specifically your config.php.
    • Upload the latest version of the files. You may need to add new sections to your config.php file, refer to the webstats changelog. You can simply update the example config.php with your MySQL information and overwrite your old config.
    • Run the updatetable.php file from a web browser. This will make any changes necessary to your database layout.
    Configuration


    The configuration file l4d_stats.cfg should be created automatically after loading the plugin. Refer to this file for full cvar information, the following settings are configuration cvars only. It is not necessary to change these, however you may do so to change the behavior of L4D Stats.
    • sm_l4dstats_announcemode - Behavior of stats announcements when points are awarded. 0 = off, 1 = Player only, 2 = Player only with Public headshots, 3 = all Public. Warning: All Public is VERY annoying, it is not recommended!
    • sm_l4dstats_medkitmode - Method for which players are given points for healing friendlies with Medkits. 0 = Dynamic point based on amount healed, 1 = Static point amount.
    • sm_l4dstats_minhumans - Minimum number of Human players required before stats run.
    • sm_l4dstats_siteurl - Your site URL, used for Rank panel advertisement.
    • sm_l4dstats_updaterate - Rate at which Common Infected kills are displayed on screen.
    • sm_l4dstats_rankonjoin - Display a player's ranking when he connects or when a map changes.
    • sm_l4dstats_silencechat - Enable/disable the showing of chat triggers to other players.
    You can find a breakdown of default point awards in the image below. Keep in mind that points are increased automatically based on difficulty, you can only edit the base (Normal difficulty) amount.

    Click here for point table


    Chat Commands
    • rank - Display your current rank information.
    • top10 - Show Top 10 players.



    Frequent Questions / Issues
    My database is on the same server as my game server, but using localhost in my database.cfg is not working.
    Try setting it to "127.0.0.1". This will force the TCP/IP interface instead of the hardcoded filesystem socket, since SourceMod seems to use a hardcoded path. (Thanks for this one Dopefish!)

    Do I need to use MySQL for the stats AND clientprefs?
    No, you technically only need MySQL for the stats. You can use the local SQLite database for clientprefs if you want, the only variable that it is used for is temporary and is reset fairly often.

    I am getting blank name entries in my players table.
    Try running the updatetable.php file included with the latest webstats zip file.

    My awards page is showing up blank after I install / upgrade.
    Your rank award is using the default, blank cache file. Set your award cache setting to 0, to disable cacheing. Then reload the award page. This should force it to generate a new award listing. If it does, you can safely set your cache setting back to the value it was before. If you still have issues, post here.

    Will you make a version that tracks by player name or IP address instead of SteamID?
    No, because you are probably using nosteam. No Steam, No Support. Pay for Valve's games you cheap fuck!

    On the player stats pages, it always says "Community URL Disabled." How do I enable this?
    You need to recompile PHP to support BCMath. You may need to ask your webhost to do this. The configure option is: '--enable-bcmath'

    Changelog

    Plugin
    Code:
    -- 0.1.0 (1/8/09)
     . Initial closed beta release!
     
    -- 0.1.1 (1/9/09)
     . Silenced plugin disable alerts, except "not enough Human players" alert.
     . Removed misc debug message.
     . Fixed misc error log messages.
     
    -- 0.1.2 (1/12/09)
     . Testing new interstitial SQL method for Common Infected kill tracking.
       Instead of sending a SQL transaction after each kill, only send SQL during
       the update period when Common Infected points are displayed. The high
       amount of SQL traffic causes noticible lag during high combat periods,
       such as when a mob attacks.
     
    -- 0.1.6 (1/13/09)
     . Fully implimented interstitial SQL update for Common Infected. Added
       check to send update when a player disconnects, so no points are lost if
       they disconnect between interstitial updates.
     . Cleaned up code a bit.
     . Improved player name sanitation.
     . Changed new players playtime to init at 1 instead of 0.
     . Changed point amounts from static values to Cvar values.
     . Added Cvar to control how stats messages are displayed to players:
        0 = Stats messages are off
        1 = Messages sent to the player who earned them only
        2 = Same as 1, but Headshots on Special Infected are globally anounced
        3 = All messages are global. Warning: This is VERY annoying!
     . Added Cvar to control whether Medkit points are given based on the amount
       healed, or a static amount set by Cvar. Amount healed is 0.5x in Normal,
       1x in Advanced, and 2x in Expert.
     . Added check to disable stats if the Database connection has failed.
     
    -- 0.1.8 (1/15/09)
     . Further cleaned up code.
     . Optimized UTF8 character support.
     . Removed log message on successful database connection.
     . Added threaded query to player inserting, to check if the player already
       exists and if so, don't attempt to INSERT IGNORE them.
     . Reformatted rank panels.
     . Added Cvar to list community site for more information in "rank" panel.
     . Removed table generation from the plugin. This will be handled by a
       setup script provided with webstats.
     
    -- 0.1.9 (1/16/09)
     . Changed all updates to threaded queries, to fix lag caused by updates and
       server timeouts in rare cases.
     
    -- 1.0.0 (1/18/09)
     . Initial public release!
     
    -- 1.1.0 (1/28/09)
     . Fixed change in update/Common Infected announcement timer not obeying
       changes to the cvar, except when in the config file and the plugin/server
       is restarted.
     . Fixed team chat not picking up chat triggers.
     . Added invalid database connection checking to rank/top10 panel display.
     . Fixed bug where players would be inserted into the database, but their
       user data would not get updated and they would appear blank.
     . Removed plugin version from showing up in the config file.
     . Removed "Not enough Humans" message when in Versus.
     . Made rank panel display after client connect at the start of each map,
       and added cvar to enable/disable this.
     . Made "Playtime" display hours if the playtime is longer than 60 minutes.
     . Added cvar to hide the display of public chat triggers.
     
    -- 1.1.1 (4/22/09)
     . Changed "IsVersus()" function to "InvalidGameMode()" to fix deadstop bug
       with the Survival update. This is part of paving the way to Survival
       and Versus stats in a future release.
     . Fixed various error messages in error logs.
     . Fixed stats panel to now work properly for people with certain characters
       in their name not making it display.
     . Fixed (again) a certain case where blank users would be inserted.
     . Added cvar to enable/disable showing of the rank panel when not in a valid
       gamemode, showing of disabled messages, and letting players use the chat
       commands.
     . Added some stat whoring checks to the plugin:
        . A maximum amount of points can be earned in a single map
        . Only 3 Tanks may be awarded during a single map
     . Fixed minor bug with Healthpack point award not giving full amount.
     . Added a few currently unused cvars for future features:
       . sm_l4dstats_dbprefix -- Prefix to be used for database tables
       . sm_l4dstats_enablecoop -- Enable stats for Coop mode
       . sm_l4dstats_enablesv -- Enable stats for Survival mode
       . sm_l4dstats_enableversus -- Enable stats for Versus mode
       . sm_l4dstats_leaderboardtime -- Duration in days to show players top
         times on the Survival leaderboards
    Webstats
    Code:
    -- 0.1 (1/12/09)
     . Initial release!
     
    -- 0.2 (1/13/09)
     . Fixed "Headshot Ratio" award from being calculated when the conditions have
       not been met
     . Fixed recently added players not being listed on the Player List page, but
       breaking page count
     . Disabled "Community URL" when BCMath is not compiled in PHP
     . Added error message when invalid campaign name is selected
     
    -- 0.3 (1/15/09)
     . Fixed typos on Awards page
     . Added "Minimum Points" requirement for "Headshot Ratio" award
     . Added "Minimum Playtime" requirement for all awards
     . Fixed UTF8 characters not displaying properly - thanks psychonic!
     
    -- 1.0 (1/18/09)
     . Initial public release!
     . Changed Team Kill and Friendly Fire awards to ignore minimum playtime
     
    -- 1.1 (1/28/09)
     . Fixed "createtable.php" to properly set the collation and character set of
       tables at creation
     . Fixed minor formatting issue with Campaigns page
     . Added "updatetable.php" file to update tables from previous versions to
       latest table layout
     . Removed unnecessary code from Awards page
     . Added "Minimum Points" requirements for all awards
     . Added "file_get_contents()" function to common.php in the instance that it
       does not function properly with existing PHP5 installs.
     . Added new "Population Comparison" system, as well as the beginning of
       individual player achievements. You can now compare your entire server's
       kill count, individual Campaign kill counts, and individual player kill
       counts to city, county, and state populations in the US!
    Webstats Examples
    F7Lans - http://www.f7lans.com/l4dstats/
    The Hampshire Heavies - http://thehh.co.uk/l4dstats.php
    SBA Gaming - http://www.sobadass.com/l4dstats/
    Multiplay - http://l4d.multiplay.co.uk/stats/
    Dopefish.de - http://www.gameserver.dopefish.de/?page_id=28

    Special Thanks
    DopeFish, Icettiflow, jasonfrog, liv3d, and everyone at F7Lans for helping me beta test in the weeks before release. There are several bugs I would not have caught had it not been for them. Thank you!
    Attached Files
    File Type: zip l4d_stats_web.zip (40.2 KB, 7875 views)
    File Type: sp Get Plugin or Get Source (l4d_stats.sp - 11039 views - 66.1 KB)
    __________________

    Last edited by msleeper; 05-03-2009 at 15:43. Reason: Updated to 1.1.1
    msleeper is offline
     



    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 18:18.


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