Raised This Month: $32 Target: $400
 8% 

[ANY] Played Time


Post New Thread Reply   
 
Thread Tools Display Modes
Author
cristian20042
AlliedModders Donor
Join Date: Jun 2016
Location: Romania
Plugin ID:
5640
Plugin Version:
2.0.1
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    It's showing the time played on the server.
    Old 05-26-2017 , 07:45   [ANY] Played Time
    Reply With Quote #1

    Plugin Description :

    I made a plugin that shows your played time on a server or another player's played time.

    Plugin Commands :

    sm_playedtime - It's showing the time you played on the server.
    sm_time - Shortcut number 2.
    sm_hours - Shortcut number 3.
    sm_gettime - Shows you someone's played time. (ADMFLAG_SLAY)

    Changelogs :
    Code:
    - 2.0.1 - Few changes
    
    - Minor fixes
    - Minor improvements.
    
    - 2.0.0 - BIG UPDATE
    
    - The plugin now uses MySQL.
    - I made the script more reading frendly.
    - Fixed a lot of bugs.
    - Added the command !gettime
    - ENJOY!
    
    - 1.0.0 - RELEASE
    
    - The release.
    IF THERE IS ANY BUG OR YOU HAVE SOME IDEAS TO ADD LEAVE A REPLY !

    Don't forget to check out my other plugin: https://forums.alliedmods.net/showth...66#post2471466
    Attached Files
    File Type: sp Get Plugin or Get Source (timeplayed.sp - 1722 views - 5.7 KB)
    __________________
    Steam - https://steamcommunity.com/id/sniperheroofficialu/
    Discord - SniperHero#8545

    Last edited by cristian20042; 08-01-2018 at 08:26.
    cristian20042 is offline
    PinHeaDi
    Senior Member
    Join Date: Jul 2013
    Location: Bulgaria
    Old 05-26-2017 , 09:10   Re: [ANY] Time Played
    Reply With Quote #2

    How can I remove(reset) someones time without "rcon exit" or restart?
    __________________
    PinHeaDi is offline
    shanapu
    Veteran Member
    Join Date: Apr 2015
    Location: .de
    Old 05-26-2017 , 10:28   Re: [ANY] Time Played
    Reply With Quote #3

    IIRC, KeyValues should not be used to store player data.

    https://wiki.alliedmods.net/KeyValue...eMod_Scripting)
    Quote:
    Note: While the following examples are correct code-wise, over the years they have occasionally led people to use KeyValues in cases where they really should be using a database instead.
    __________________
    coding & free software
    shanapu is offline
    cristian20042
    AlliedModders Donor
    Join Date: Jun 2016
    Location: Romania
    Old 05-26-2017 , 11:23   Re: [ANY] Time Played
    Reply With Quote #4

    Quote:
    Originally Posted by shanapu View Post
    IIRC, KeyValues should not be used to store player data.

    https://wiki.alliedmods.net/KeyValue...eMod_Scripting)
    Yes , i know, but here is a simple method that i used... If i want to make it with a database it's very hard...
    cristian20042 is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 05-27-2017 , 13:58   Re: [ANY] Time Played
    Reply With Quote #5

    On really popular servers, this is going to cause problems. Every time a player joins or leaves, you load the ENTIRE file into memory, re-saving the entire file on disconnects. This is going to cause insane lag.

    If an SQL database isn't what you want to set up, then at least use Clientprefs... Even that's not intended use, but it's better than KV.
    __________________

    Last edited by ddhoward; 05-27-2017 at 14:02.
    ddhoward is offline
    cristian20042
    AlliedModders Donor
    Join Date: Jun 2016
    Location: Romania
    Old 07-31-2018 , 17:53   Re: [ANY] Played Time
    Reply With Quote #6

    BIG UPDATE!

    Check up!
    __________________
    Steam - https://steamcommunity.com/id/sniperheroofficialu/
    Discord - SniperHero#8545
    cristian20042 is offline
    shanapu
    Veteran Member
    Join Date: Apr 2015
    Location: .de
    Old 07-31-2018 , 20:18   Re: [ANY] Played Time
    Reply With Quote #7

    Code:
    #define SniperH_Stock stock
    #define _SniperH_In_Out_ 
    #define _SniperH_In_ 
    #define _SniperH_Out_
    what the heck?

    edit:
    Spoiler
    __________________
    coding & free software

    Last edited by shanapu; 07-31-2018 at 20:48.
    shanapu is offline
    cristian20042
    AlliedModders Donor
    Join Date: Jun 2016
    Location: Romania
    Old 08-01-2018 , 08:18   Re: [ANY] Played Time
    Reply With Quote #8

    Quote:
    Originally Posted by shanapu View Post
    Code:
    #define SniperH_Stock stock
    #define _SniperH_In_Out_ 
    #define _SniperH_In_ 
    #define _SniperH_Out_
    what the heck?

    edit:
    Spoiler
    Well, thanks
    __________________
    Steam - https://steamcommunity.com/id/sniperheroofficialu/
    Discord - SniperHero#8545
    cristian20042 is offline
    axelnieves2012
    Senior Member
    Join Date: Oct 2014
    Location: Argentina
    Old 06-23-2020 , 22:51   Re: [ANY] Played Time
    Reply With Quote #9

    L 06/23/2020 - 00:55:41: SourceMod error session started
    L 06/23/2020 - 00:55:41: Info (map "l4d_hospital01_apartment") (file "D:\Steam\steamapps\common\Left 4 Dead Dedicated Server\left4dead\addons\sourcemod\logs\errors _20200623.log")
    L 06/23/2020 - 00:55:41: [SM] Exception reported: Can't reach the database.
    L 06/23/2020 - 00:55:41: [SM] Blaming: testing\timeplayed.smx
    L 06/23/2020 - 00:55:41: [SM] Call stack trace:
    L 06/23/2020 - 00:55:41: [SM] [0] SetFailState
    L 06/23/2020 - 00:55:41: [SM] [1] Line 38, /home/forums/content/files/2/7/1/0/3/5/170741.attach::OnPluginStart
    axelnieves2012 is offline
    fkr
    Junior Member
    Join Date: Aug 2020
    Location: Bucharest, Romania
    Old 08-26-2020 , 09:50   Re: [ANY] Played Time
    Reply With Quote #10

    Quote:
    Originally Posted by cristian20042 View Post
    Plugin Description :

    I made a plugin that shows your played time on a server or another player's played time.

    Plugin Commands :

    sm_playedtime - It's showing the time you played on the server.
    sm_time - Shortcut number 2.
    sm_hours - Shortcut number 3.
    sm_gettime - Shows you someone's played time. (ADMFLAG_SLAY)

    Changelogs :
    Code:
    - 2.0.1 - Few changes
    
    - Minor fixes
    - Minor improvements.
    
    - 2.0.0 - BIG UPDATE
    
    - The plugin now uses MySQL.
    - I made the script more reading frendly.
    - Fixed a lot of bugs.
    - Added the command !gettime
    - ENJOY!
    
    - 1.0.0 - RELEASE
    
    - The release.
    IF THERE IS ANY BUG OR YOU HAVE SOME IDEAS TO ADD LEAVE A REPLY !

    Don't forget to check out my other plugin: https://forums.alliedmods.net/showth...66#post2471466
    Hello cristian20042,

    Is the database connection added to: /addons/sourcemod/configs/databases.cfg ?

    Thank you,
    Cristian

    Last edited by fkr; 08-26-2020 at 09:50.
    fkr 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:21.


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