Raised This Month: $ Target: $400
 0% 

Time played for all users


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 06-30-2015 , 16:14   Time played for all users
Reply With Quote #1

hey, is there a plugin that count all players active time time spent on multiple servers that preferably log the time into a database. If not, is there anyone who would wanna take this challenge on?
A separate time log for the activity on each server for all players and a total time active on all servers for all players would be amazing.

So it would look like this (each row for a collumn in the db)

k0nan
(SteamID)
Total time: 242h 23m
Hide'n'Seek: 142h 10m
Surf: 50h 13m
Aim: 50h
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 06-30-2015 , 20:46   Re: Time played for all users
Reply With Quote #2

Paid? Volunteer? Helps to specify.

I dont know of any such plugin, but it wouldnt be all to hard to code one. One downside to it: sometimes players can disconnect and the OnClientPostAdminCheck event wont have fired. So, while this is usually not the case, occasionally it will not have a start time to compute the play time with. I have a plugin that logs this sort of stuff, but to FTP logs for each steam ID, not to a database. Also, do you need it to differentiate between time in spec vs time on teams? I feel that can make the values far more meaningful.
__________________
ThatOneGuy is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 06-30-2015 , 23:42   Re: Time played for all users
Reply With Quote #3

I have not seen this posted here, but it should be done with mysql, not some silly flatfile implementstion.
Easy to write.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 06-30-2015 , 23:53   Re: Time played for all users
Reply With Quote #4

Quote:
Originally Posted by friagram View Post
I have not seen this posted here, but it should be done with mysql, not some silly flatfile implementstion.
Easy to write.
It is part of another plugin, so the flatfile made sense for it...dont talk shit til you know context...smh

As for the OP request, mysql is the only way I would suggest doing it (I dont think that was in question but wanted to clear up that I wasnt suggesting otherwise).
__________________
ThatOneGuy is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 07-01-2015 , 01:32   Re: Time played for all users
Reply With Quote #5

Quote:
Originally Posted by ThatOneGuy View Post
It is part of another plugin, so the flatfile made sense for it...dont talk shit til you know context...smh

As for the OP request, mysql is the only way I would suggest doing it (I dont think that was in question but wanted to clear up that I wasnt suggesting otherwise).
Still fail, as the average popular server could get tens of thousands of unique visitors over a month, which is a lot of needless files. The context does not matter. Flatfile approach like this is beyond bad when much better alternatives are easily available.

Also, you dont need postadmincheck, onclientauthorized is the proper callback and happens much earlier.

Don't act like you know what you are doing and be insulting to others when you clearly know very little.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 07-01-2015 , 02:43   Re: Time played for all users
Reply With Quote #6

Quote:
Originally Posted by friagram View Post
Still fail, as the average popular server could get tens of thousands of unique visitors over a month, which is a lot of needless files. The context does not matter. Flatfile approach like this is beyond bad when much better alternatives are easily available.

Also, you dont need postadmincheck, onclientauthorized is the proper callback and happens much earlier.

Don't act like you know what you are doing and be insulting to others when you clearly know very little.
Your really eating your own words kiddo.

The plugin I mentioned involves admin checks, so OnClientPostAdminCheck IS required.
From clients.inc:
Spoiler

The plugin is namely logging admin actions, but includes play time, so mysql would be a terrible platform for such a plugin.

And the number of users is limited to the server admins, so it isnt thousands of unique visitors.

Try not to be so ignorant and rude next time...grow up a bit.

EDIT: Anyways...back on topic....I've coded the plugin, it compiles great, but it still needs testing. Right now, it separates the time into an SQL table column for both play time and another column for spectate time, and auto-appends two new columns every time a new server runs the plugin. I'm off to bed, but will test it tomorrow.
__________________

Last edited by ThatOneGuy; 07-01-2015 at 02:54.
ThatOneGuy is offline
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 07-01-2015 , 17:33   Re: Time played for all users
Reply With Quote #7

I don't really follow all your advance talking XD
But I do however want the logging to be done with a MySQL database so I can output the data on my community.
Also, How's it going 'ThatOneGuy'? Have you got it to work?
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
necavi
Veteran Member
Join Date: Sep 2010
Old 07-03-2015 , 14:48   Re: Time played for all users
Reply With Quote #8

No, they don't. Think about it, what exactly will that render when formatted? sm_ptt_add "";quit;""

Last edited by necavi; 07-03-2015 at 14:48.
necavi is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 07-03-2015 , 21:22   Re: Time played for all users
Reply With Quote #9

Quote:
Originally Posted by necavi View Post
No, they don't. Think about it, what exactly will that render when formatted? sm_ptt_add "";quit;""
Ok.
PHP Code:
#include <sourcemod>
public OnClientPutInServer(client){ ServerCommand("sm_ptt_add #%d"GetClientUserId(client)); } 
thecount is offline
Reply



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 08:02.


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