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

[ANY] Time Played Command


Post New Thread Reply   
 
Thread Tools Display Modes
Author
hlsavior
Junior Member
Join Date: Sep 2012
Plugin ID:
3328
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Lets a client view the ammount of time he/she's spent in a server.
    Unapprover:
    Reason for Unapproving:
    Throws errors
    Old 10-27-2012 , 00:24   [ANY] Time Played Command
    Reply With Quote #1

    • This plugin records the amount of time a player has spent in your server.
    • They can view this info by typing "sm_timeplayed" or "!timeplayed"
    • The stats for the time is stored in "sourcemod/data/stats/timeplayed.txt".


    SCREEN SHOT:

    NOTE: MINE SAYS "SCNG'S SERVER" BECAUSE I CONFIGURED IT THAT WAY THE ONE YOU DOWNLOAD WILL SAY "THIS SERVER" YOU CAN CHANGE IT HERE:
    Code:
    public Action:Command_getTime(client)
    {
        PrintToChat(client, "\x05You have played on this server for \x03%d\x05 minutes!", Minutes[client])
        return Plugin_Handled;
    }
    Attached Files
    File Type: sp Get Plugin or Get Source (Time_Played.sp - 1650 views - 1.9 KB)

    Last edited by hlsavior; 10-27-2012 at 00:25.
    hlsavior is offline
    Windroid
    Member
    Join Date: Mar 2013
    Old 09-22-2013 , 10:06   Re: [ANY] Time Played Command
    Reply With Quote #2

    Nice plugin!
    But can you add a command to let player,check top10 longest time played player in the server?like !timetop10.
    Windroid is offline
    745px
    Junior Member
    Join Date: Nov 2012
    Location: Denmark
    Old 09-22-2013 , 10:41   Re: [ANY] Time Played Command
    Reply With Quote #3

    Quote:
    Originally Posted by Windroid View Post
    Nice plugin!
    But can you add a command to let player,check top10 longest time played player in the server?like !timetop10.
    Agreed, it would be awesome with a top 10. Considering many servers are running with HLStatsX / GameME, would it be possible to use some of the already recorded data?
    745px is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 09-22-2013 , 11:05   Re: [ANY] Time Played Command
    Reply With Quote #4

    There's https://forums.alliedmods.net/showthread.php?p=1751973.
    __________________
    thetwistedpanda is offline
    Windroid
    Member
    Join Date: Mar 2013
    Old 09-23-2013 , 03:43   Re: [ANY] Time Played Command
    Reply With Quote #5

    Quote:
    Originally Posted by thetwistedpanda View Post
    umm...is that support tf2?
    Windroid is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 09-23-2013 , 04:29   Re: [ANY] Time Played Command
    Reply With Quote #6

    There's no CS:S specific code, so give it a try.
    __________________
    thetwistedpanda is offline
    Vastrix
    Senior Member
    Join Date: Aug 2012
    Location: Zion
    Old 07-31-2014 , 09:28   Re: [ANY] Time Played Command
    Reply With Quote #7

    Can you add something like /topweek

    which then shows a table of the players that played the longest that week?
    this would be cool...

    Thanks
    Vastrix is offline
    crafting
    Senior Member
    Join Date: May 2014
    Location: Somewhere on Earth
    Old 07-20-2017 , 01:57   Re: [ANY] Time Played Command
    Reply With Quote #8

    I don't know if anyone would be able to fix this, but I was getting this error on my servers.....

    L 07/13/2017 - 00:18: 32: [SM] Exception reported: Handle 17ed1102 is invalid (error 3)
    L 07/13/2017 - 00:18: 32: [SM] Blaming: Time_Played.smx
    L 07/13/2017 - 00:18: 32: [SM] Call stack trace:
    L 07/13/2017 - 00:18: 32: [SM] [0] CloseHandle
    L 07/13/2017 - 00:18: 32: [SM] [1] Line 34, /home/groups/alliedmodders/forums/files/1/9/4/9/8/0/111411.attach::OnClientDisconnect
    crafting is offline
    PBFliX
    Member
    Join Date: Apr 2017
    Location: United Kingdom
    Old 07-21-2017 , 09:22   Re: [ANY] Time Played Command
    Reply With Quote #9

    Quote:
    Originally Posted by thetwistedpanda View Post
    This plugins works great. However if you want to use it for TF2 you might want to change the code so it doesn't say CT's/T's.
    __________________
    PBFliX is offline
    asherkin
    SourceMod Developer
    Join Date: Aug 2009
    Location: OnGameFrame()
    Old 08-19-2017 , 19:17   Re: [ANY] Time Played Command
    Reply With Quote #10

    Quote:
    Originally Posted by crafting View Post
    I don't know if anyone would be able to fix this, but I was getting this error on my servers.....

    L 07/13/2017 - 00:18: 32: [SM] Exception reported: Handle 17ed1102 is invalid (error 3)
    L 07/13/2017 - 00:18: 32: [SM] Blaming: Time_Played.smx
    L 07/13/2017 - 00:18: 32: [SM] Call stack trace:
    L 07/13/2017 - 00:18: 32: [SM] [0] CloseHandle
    L 07/13/2017 - 00:18: 32: [SM] [1] Line 34, /home/groups/alliedmodders/forums/files/1/9/4/9/8/0/111411.attach::OnClientDisconnect
    Quote:
    [00:12] asherkin: if a client connects but leaves very quickly, say during downloads, OnClientPutInServer will not fire, but OnClientDisconnect will
    [00:13] asherkin: which is one of the many reasons that certain client related forwards are documented as being paired for usage like this
    [00:13] asherkin: the plugin is closing the handle in OnClientDisconnect, but not setting it to null - so CloseHandle can be called on it twice in that case
    [00:13] asherkin: just swap CloseHandle out for delete
    __________________
    asherkin 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 10:16.


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