View Single Post
Author Message
namazso
Member
Join Date: Mar 2012
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, 940 views)
File Type: sp Get Plugin or Get Source (ptt.sp - 1866 views - 7.5 KB)

Last edited by namazso; 08-23-2019 at 15:40. Reason: 3.1.0
namazso is offline