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

[ANY] Player Time Tracker (Redux) (3.1.0, 10/18/15)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
namazso
Member
Join Date: Mar 2012
Plugin ID:
4643
Plugin Version:
3.1.0
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Track players' play times in SQL
    Old 05-22-2015 , 18:25   [ANY] Player Time Tracker (Redux) (3.1.0, 10/18/15)
    Reply With Quote #1

    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.

    What's changed
    • Incompatible with old one.
    • Faster. Like, a lot faster.
    • Tracks everyone.
    • Better webui.
    • Pages and search on webui.
    • New tracking mode (Mode 1).
    • Completely rewritten webui, about 98% rewritten plugin.
    • Using a simple printf format instead of a 25-line math stuff for displaying time.

    Limitations and Bugs
    1. Do not switch modes while server is running! It WILL dupe players' current session playtime.
    2. Mode 1 is EXPIREMENTAL! I'm not responsible for broken times, crashing servers or thermonuclear war.
    3. UTF-8 on webpanel may randomly break or fix itself. I don't know why.

    To-do
    • Suggest some!

    CVars

    sm_ptt_version2 "3.0.0" - Guess what..
    sm_ptt_refresh "5" - Time (in seconds) between data updates. [5-60]
    sm_ptt_database "default" - Database (in databases.cfg) to use.
    sm_ptt_table "time_tracker" - Table in your SQL Database to use.
    sm_ptt_team "1" - Who to track: 0 = all, 1 = only those on a team. Not working with mode 1
    sm_ptt_mode "0" - Track mode: 0 = on refresh (resource-heavy), 1 = on disconnect (untested, fast, expiremental).

    Commands

    sm_mytime - Get your playtime!
    sm_gettime <target> - Time of someone else.

    How to install this plugin?
    1. Set up your databases.cfg if you haven't already. Only MySQL is supported
    2. Install ptt.smx in plugins folder
    3. Load Plugin
    4. Change plugin.ptt.cfg in /cfg/sourcemod
    5. Reload plugin

    And how about that webstuff?
    1. Enter conenction details in config.php
    2. Copy stuff on website
    3. LICENSE: Edit whatever you want, however you are not allowed to remove the Copyright Notice at the bottom. Redistribute with these terms included.

    Changelog

    v3.1.1
    • Fixed sm_gettime and sm_mytime throwing errors and writing only to console - now writes only to chat. sorry.

    v3.1.0
    • Fixed sm_gettime
    • Rewritten some parts
    • More efficent SQL
    • Added comments in code

    v3.0.1
    • Leftover coloumn removed

    v3.0.0
    • Initial release.

    Credits:
    • Original plugin here. This is a almost-complete rewrite of the plugin, and a complete rewrite of the webpanel.
    • Online tracker designed by DjDavid98

    Download count of prior versions: 161
    Attached Files
    File Type: zip playtime.zip (2.9 KB, 931 views)
    File Type: sp Get Plugin or Get Source (ptt.sp - 1846 views - 7.5 KB)

    Last edited by namazso; 08-23-2019 at 15:40. Reason: 3.1.0
    namazso is offline
    kanalumaddela
    Junior Member
    Join Date: Nov 2014
    Location: U.S.
    Old 05-22-2015 , 20:53   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #2

    anything different compared to what hlstats can do?
    kanalumaddela is offline
    namazso
    Member
    Join Date: Mar 2012
    Old 05-23-2015 , 01:02   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #3

    Quote:
    Originally Posted by kanalumaddela View Post
    anything different compared to what hlstats can do?
    it only tracks time, more lightweight, and doesnt need an additional script. if you use hlstatsx then this plugin is probably not for you
    namazso is offline
    asdfxD
    Veteran Member
    Join Date: Apr 2011
    Old 05-23-2015 , 02:55   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #4

    namazso.eu/playtime/

    Error: Network Timeout

    The server namazso.eu takes too long to post a response.

    Last edited by asdfxD; 05-23-2015 at 02:56.
    asdfxD is offline
    namazso
    Member
    Join Date: Mar 2012
    Old 05-23-2015 , 02:57   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #5

    i know, VPS hoster has maintenance today, will be up sometime during the day

    Edit: up now

    Last edited by namazso; 05-23-2015 at 03:23.
    namazso is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 06-02-2015 , 23:58   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #6

    The plugin doesn't seem to be working for me.

    No table is being created and the errors are as follows:
    Code:
    L 06/02/2015 - 23:56:07: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 0 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:09: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:11: [ptt.smx] [PTT] ERROR: Problem with the SQL query! (SELECT name, time_played FROM TimeTracker WHERE steamid = 'STEAM_1:0:997507')
    L 06/02/2015 - 23:56:14: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:19: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:24: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:29: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:34: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:39: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    Also when I type !mytime it looks like this:


    Thank you for any help
    Addicted. is offline
    namazso
    Member
    Join Date: Mar 2012
    Old 06-14-2015 , 01:52   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #7

    Quote:
    Originally Posted by oaaron99 View Post
    The plugin doesn't seem to be working for me.

    No table is being created and the errors are as follows:
    Code:
    L 06/02/2015 - 23:56:07: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 0 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:09: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:11: [ptt.smx] [PTT] ERROR: Problem with the SQL query! (SELECT name, time_played FROM TimeTracker WHERE steamid = 'STEAM_1:0:997507')
    L 06/02/2015 - 23:56:14: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:19: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:24: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:29: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:34: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    L 06/02/2015 - 23:56:39: [ptt.smx] [PTT] ERROR: Problem with the SQL query! Id: 1 Error: Table 'clientprefs.TimeTracker' doesn't exist
    Also when I type !mytime it looks like this:


    Thank you for any help
    clientprefs is a SQLite table, and probably my sql queries don't work with it as it was designed to be used with MySQL

    Last edited by namazso; 06-14-2015 at 02:05.
    namazso is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 06-14-2015 , 14:15   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #8

    Quote:
    Originally Posted by namazso View Post
    clientprefs is a SQLite table, and probably my sql queries don't work with it as it was designed to be used with MySQL
    I have clientprefs as a MYSQL database. Anyway I tried with other databases.
    Addicted. is offline
    namazso
    Member
    Join Date: Mar 2012
    Old 06-14-2015 , 17:18   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #9

    Quote:
    Originally Posted by oaaron99 View Post
    I have clientprefs as a MYSQL database. Anyway I tried with other databases.
    you can try running CREATE TABLE IF NOT EXISTS `%s` (`name` varchar(64) CHARACTER SET utf8 NOT NULL, `steamid` varchar(64) NOT NULL, `time_played` int(64) NOT NULL, UNIQUE KEY `steamid` (`steamid`)) manually, replacing %s with your table's name. btw i'm not sure if you need the database.table format, you could use only table, but i doubt that this is the problem

    Edit: tracking is not needed coloumn, it was an accidental leftover from the original plugin, and it may cause some problems. OP will be updated

    Last edited by namazso; 06-15-2015 at 01:17.
    namazso is offline
    WaffleMaddness
    Junior Member
    Join Date: Jan 2013
    Old 06-13-2015 , 17:51   Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
    Reply With Quote #10

    Awesome, thank you so much for this plugin! I will try it out on my CS:S server!
    WaffleMaddness 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:23.


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