AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Player Time Tracker (Redux) (3.1.0, 10/18/15) (https://forums.alliedmods.net/showthread.php?t=263310)

namazso 05-22-2015 18:25

[ANY] Player Time Tracker (Redux) (3.1.0, 10/18/15)
 
2 Attachment(s)
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

kanalumaddela 05-22-2015 20:53

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
anything different compared to what hlstats can do?

namazso 05-23-2015 01:02

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
Quote:

Originally Posted by kanalumaddela (Post 2299926)
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

asdfxD 05-23-2015 02:55

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
namazso.eu/playtime/

Error: Network Timeout

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

namazso 05-23-2015 02:57

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
i know, VPS hoster has maintenance today, will be up sometime during the day

Edit: up now

Addicted. 06-02-2015 23:58

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
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:
http://i.imgur.com/zNH4bVz.png

Thank you for any help :D

WaffleMaddness 06-13-2015 17:51

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
Awesome, thank you so much for this plugin! I will try it out on my CS:S server!

namazso 06-14-2015 01:52

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
Quote:

Originally Posted by oaaron99 (Post 2304179)
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:
http://i.imgur.com/zNH4bVz.png

Thank you for any help :D

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

Addicted. 06-14-2015 14:15

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
Quote:

Originally Posted by namazso (Post 2307671)
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.

namazso 06-14-2015 17:18

Re: [ANY] Player Time Tracker (Redux) (3.0.0, 5/22/15)
 
Quote:

Originally Posted by oaaron99 (Post 2307870)
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


All times are GMT -4. The time now is 15:17.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.