Raised This Month: $89 Target: $400
 22% 

Player Time Tracker v2.3.5


Post New Thread Reply   
 
Thread Tools Display Modes
Author
crazydog
SourceMod Donor
Join Date: Jan 2006
Plugin ID:
907
Plugin Version:
2.3.5
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Tracks how long specific people have played on any servers that you have this plugin installed on.
    Old 05-31-2009 , 15:54   Player Time Tracker v2.3.5
    Reply With Quote #1

    This plugin is NOT recommended to be used with Left4Dead (yet), ESPECIALLY with forked servers (never). USE AT YOUR OWN RISK!


    Description:
    This plugin lets you track how long specific people have played on any servers that you have this plugin installed on. It uses a MySQL database to store the information.

    Commands:
    All require the ban flag
    sm_ptt_add <Client Name>: Adds a client to the database to be tracked
    sm_ptt_delete <Client Name>: Removes a client from the database.
    sm_ptt_stop <Client Name>: Stops tracking the client, but does not delete their time from the database
    sm_ptt_start<Client Name>: Reverses the effect of sm_track_stop
    sm_ptt_gettime <Client Name>: Prints target's current time played (hh:mm:ss) into console.
    sm_mytime: Prints your time into chat. (Alternatively, say !mytime).

    Cvars: - plugin.ptt.cfg is auto-generated in cfg/sourcemod/ . Please edit that file to change these options.
    sm_ptt_default_action - Start tracking as soon as client is added to database? (1=yes 0=no) default=1
    sm_ptt_automatic - Track every player that ever connects to your server? (1=yes 0=no) default=0
    sm_ptt_enabled - Enable tracking? (1=yes 0=no) default=1
    sm_ptt_refresh - Time (in seconds) between data updates default= 5
    sm_ptt_database - Database connection (in databases.cfg) to use. Default="default"
    sm_ptt_table - Table in your SQL database to use. Default="TimeTracker" - Good for keeping separate servers separate!
    sm_ptt_version - Shows plugin version
    sm_ptt_team - Which players to track: 1=all, 2=only those on a team (no spectators/unassigned) Default=1


    Installation Instructions:
    1) Run this SQL command on your database:
    Code:
    CREATE TABLE `TimeTracker` (
      `name` varchar(64) NOT NULL,
      `steamid` varchar(64) NOT NULL,
      `TimePlayed` int(64) NOT NULL,
      `tracking` tinyint(1) NOT NULL,
      UNIQUE KEY `steamid` (`steamid`)
    )
    2) Download and place ptt.smx into your addons/sourcemod/plugins/ directory

    3) Open cfg/sourcemod/plugin.ptt.cfg and edit to your needs

    4) (Optional) Download ptt webui.zip, upload contents to webserver, change settings in ptt.mysql.inc.php

    Notes:

    --By default, this uses your "default" SQL server. Make sure you have it set up in configs/databases.cfg. You can change the database connection to use with "sm_ptt_database"

    --Please note as of now, if you want to add or remove a track, or check someone's time, they need to be in the same server you are in. A future addition to this plugin will allow you to remove or check times when they are not in the server. Adding tracks will be added too, but you will need to know their Steam ID.

    Changelog:
    Code:
    2.3.5 UNTESTED! :D
     - Added sm_ptt_team
     - Fixed bug blocking tracking of bots
     - Removed some redundant code
    2.3.4
     - Fixed error log spam
    2.3.3
     - Fixed bug related to Bots
    2.3.2
     - Added FCVAR_DONTRECORD to version cvar
    2.3.1
     - Fixed another bug with sm_ptt_automatic not working well
    2.3
     - ptt.txt is no longer needed. Feel free to delete!
     - Fixed long standing issue with names with single quotes in them
     - Removed OnClientDisconnect added in 2.2 as it is no longer needed
    2.2.1
     - Fixed a bug that broke sm_ptt_automatic
    2.2
     - Times are no longer updated on disconnect
     - sm_ptt_refresh minimum changed to 1.0, maximum changed to 10.0
     - OnClientPostAdminCheck now OnClientAuthorized
     - Steam IDs are checked on map change to prevent SQL errors when sm_ptt_automatic is on.
     - Steam ID stored to a client is cleared when they disconnect to prevent bugs
    2.1
    - Changed how times are updated using decaprime's suggestion (Occam's razor-esque solution!)
     - When a player's time is updated, it adds updateinterval to his current time, instead of calulating that same number using too much logic (D'oh!)
    - When a player is added to the tracker, his current gametime is added.
    2.0.5
     - Bug fixes
    2.0.4
     - Auto config added
    2.0.3
     - Added sm_ptt_table
    2.0.2
     - Added sm_ptt_database
    2.0.1
     - Fixed a MAJOR bug that I stupidly created
    2.0
     - Changed how times are updated on intervals. Negative times should be a thing of the past (hopefully)!
     - Attemps to stop recording time for people who are timing out
    1.7.5
     - Some special characters in names will show up correctly now    
     - Names are now updated when times are updated
    1.7.4
     - Added another check to prevent corrupt times
    1.7.3
     - Userids are now stored in a data file, so in-place upgrades will not be a problem anymore.
    1.7.2
     - Changed logic for determining if cilent is connecting new, or if they are just changing maps
     - Bug fixes
    1.7.1
     - Added logic to make sure that a client's time won't be updated on the update interval if they disconnected during the interval
    1.7
     - Fixed lag when updating times on interval by switching to threaed SQL queries (which took way too long! :P)
     - Refresh time is now updated as soon as sm_ptt_refresh is changed
     - Bug fixes
    1.6.1
     - Fixed bug where times would be overwritten if clients didn't disconnect gracefully		
    1.6
     - Added sm_ptt_refresh
     - Times are now updated every x seconds, where x is the value of sm_ptt_refresh, as well as on disconnect. 
     - SQL table updated. Plugin will warn you if you are missing the addition, and will not update times on the sm_ptt_refresh interval
    1.5.3
     - Renamed all cvars/commands from sm_track to sm_ptt
    1.5.2
     - Added sm_track_version convar
     - Simple Web UI!
    1.5.1
     - Added responses to more admin commands
    1.5
     - Removed player_activate event handler, added OnClientAuthorized
     - Added sm_track_enabled
     - Added sm_mytime
     - Bug fixes
     - Changed plugin file name to ptt
    1.4.1
     - More bug fixes! :D
    1.4
      - Added sm_track_automatic
      - Bug fixes		
    1.3.2
      - Misc. bug fixes
    1.3.1
      - Fixed invalid client index error spamming error logs
      - Removed time update on death
      - Fixed default track action not working
    1.3
     - sm_track_add/delete now deals with creating and removing rows in the database
       ONLY
     - sm_track_start/stop does not add/remove any rows, just enables or disables
       tracking on a player without interfering with the recorded time
     - added Cvar sm_track_default_action 
     - Time is now updated on death and disconnect
    1.2
     - Fixed two errors being thrown too much
     - Changed sm_track_add to sm_track_start
     - Changed sm_track_remove to sm_track_delete
    1.1
     - Fixed bug calculating seconds
     - Fixed formatting of time display
    1.0
     - Initial Release
    Web UI Changelog:
    Code:
    1.3
     - Added support in mysql config file for different table names
    1.2
     - Fixed encoding of some characters
    1.1
     - Increased width of table
     - Added sorting
    1.0
     - Initial Release
    README BEFORE UPGRADING
    Disregard if you are upgrading FROM v2.1 or later
    Due to the way the plugin is structured (to prevent invalid times), you should only upgrade this plugin when you server is EMPTY!
    Let me repeat:
    If you want to upgrade this plugin, YOUR SERVER SHOULD BE EMPTY!
    Make sure you change the map/restart your server as soon as you put the updated version on, or TIMES WILL BE WRONG!

    PLEASE DO
    ALSO:
    Please run this command on your SQL Database, or you will get problems with SQL queries
    ALTER TABLE `TimeTracker` DROP `StoredTime`;

    If you are upgrading from version 2.2 or earlier:
    Please delete cfg/sourcemod/plugin.ptt.cfg before upgrading to allow a new config file to be generated. Then change it with your preferences.
    Attached Files
    File Type: sp Get Plugin or Get Source (ptt.sp - 1602 views - 22.7 KB)
    File Type: zip ptt webui.zip (2.1 KB, 1018 views)

    Last edited by crazydog; 12-02-2011 at 15:02.
    crazydog is offline
    NedStar
    Senior Member
    Join Date: Apr 2005
    Location: The Netherlands
    Old 05-31-2009 , 17:21   Re: Player Time Tracker
    Reply With Quote #2

    Lovely was looking for something like this. Web interface be great
    Also an option to track every player in the server would be superb, gametracker is annoying the crap out of me
    __________________
    NedStar is offline
    Send a message via MSN to NedStar
    crazydog
    SourceMod Donor
    Join Date: Jan 2006
    Old 05-31-2009 , 17:30   Re: Player Time Tracker
    Reply With Quote #3

    Do you mean current players? Or all players ever in the server?
    crazydog is offline
    flubber
    Senior Member
    Join Date: Oct 2007
    Old 05-31-2009 , 22:06   Re: Player Time Tracker
    Reply With Quote #4

    You should add a cvar to remove time front old period, let me explain a player have 13hours during april he doesn't play thru may but keep his time, admin should be albe to set nombers of day of tracking.
    flubber is offline
    crazydog
    SourceMod Donor
    Join Date: Jan 2006
    Old 06-01-2009 , 08:51   Re: Player Time Tracker
    Reply With Quote #5

    You had two ideas in there...let me make sure I understood them.

    1) Reset a player's time (This can already be done by calling remove and add)
    2) Have a pre-set number of days, and when those days run out stop tracking, but keep the record?
    crazydog is offline
    NedStar
    Senior Member
    Join Date: Apr 2005
    Location: The Netherlands
    Old 06-01-2009 , 17:45   Re: Player Time Tracker
    Reply With Quote #6

    Quote:
    Originally Posted by crazydog View Post
    Do you mean current players? Or all players ever in the server?

    All players ever.
    __________________
    NedStar is offline
    Send a message via MSN to NedStar
    crazydog
    SourceMod Donor
    Join Date: Jan 2006
    Old 06-01-2009 , 20:40   Re: Player Time Tracker
    Reply With Quote #7

    That sounds doable. It'll be in the next version.
    crazydog is offline
    crazydog
    SourceMod Donor
    Join Date: Jan 2006
    Old 06-04-2009 , 01:58   Re: Player Time Tracker [1.4]
    Reply With Quote #8

    1.4 released. Automatic tracking of all players who connect added. Thanks for the suggestion, it really helps with testing!

    Let me know any more suggestions anyone has. I'll begin work on the web interface in the meantime.
    crazydog is offline
    crazydog
    SourceMod Donor
    Join Date: Jan 2006
    Old 06-05-2009 , 12:57   Re: Player Time Tracker [1.4.1]
    Reply With Quote #9

    Quote:
    Originally Posted by csd900 View Post
    if i give someone controls of my TF2 server will you please add this mod for me ill do anything
    You just need to upload it to addons/sourcemod/plugins
    crazydog is offline
    csd900
    BANNED
    Join Date: Jun 2009
    Old 06-05-2009 , 13:29   Re: Player Time Tracker [1.4.1]
    Reply With Quote #10

    yes but i cant find that
    csd900 is offline
    Send a message via AIM to csd900
    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 15:44.


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