Raised This Month: $1951 Target: $400
 487% 

Player Activity


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Statistical       
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: Catlands
Old 03-08-2020 , 00:24   Player Activity
Reply With Quote #1

Player Activity saves player's total playtime on a database for statistical purposes.

Commands:
say /activity - displays current playtime and all time activity
amx_activity - shows current players' activity, [steamid] for search (flag: m) - displays all current players' all time activity


Cvar:
activity_search_limit - default '500'
Modifies the search limit. If you wish to remove the limit set the cvar to '0'


API:
_get_user_time(id) - return player's all time activity
_get_user_time_timestamp(id) - return player's last seen

* Plugin uses nVault Utility by bugsy
https://forums.alliedmods.net/showthread.php?t=139584

* Player Activity available on GitHub:
https://github.com/CrXane/PlayerActivity
__________________

Last edited by Relaxing; 07-10-2020 at 13:03.
Relaxing is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-08-2020 , 14:19   Re: Player Activity
Reply With Quote #2

Why the crx_ prefix tho.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 04-07-2020 , 11:36   Re: Player Activity
Reply With Quote #3

https://forums.alliedmods.net/showthread.php?p=457071
https://forums.alliedmods.net/showthread.php?t=201869

Unapproved. If you add more features let me know.
__________________
HamletEagle is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: Catlands
Old 06-21-2020 , 20:27   Re: Player Activity
Reply With Quote #4

Added a search option for amx_activity command.
If you call the command without arguments it will print current players' total playtime.
Adding an argument will search for a specific player. If there's no specific player matching the argument, the function finds the best matches and displays their total playtime and their last seen online.
To prevent the plugin breaking, the maximum of results is 500. You can edit the limit at the source code.
__________________

Last edited by Relaxing; 06-21-2020 at 20:34.
Relaxing is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 06-22-2020 , 06:24   Re: Player Activity
Reply With Quote #5

Quote:
Originally Posted by Relaxing View Post
To prevent the plugin breaking, the maximum of results is 500. You can edit the limit at the source code.
Why not make it customizable? Shouldn't take a lot of time.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: Catlands
Old 07-10-2020 , 13:05   Re: Player Activity
Reply With Quote #6

Added a cvar and removed the static value of search limit as requested by Napoleon_be
Cvar: activity_search_limit - on default is set to '500' but if you can remove this limit by setting the cvar to '0'
__________________
Relaxing 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 15:40.


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