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

[ANY] Timeleft in Hostname


Post New Thread Reply   
 
Thread Tools Display Modes
Author
AzaZPPL
Member
Join Date: Dec 2014
Plugin ID:
5301
Plugin Version:
1.5
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Shows timeleft or time thats left in the hostname
    Old 08-02-2016 , 10:33   [ANY] Timeleft in Hostname
    Reply With Quote #1

    Shows the time left in the servers hostname.

    Not enabled:


    Enabled:


    Enabled with {{timeleft}}:


    Installation:
    1. Copy the .smx to your addons/sourcemod/plugins folder.
    2. Restart your server.
      Optional:
    3. Change settings in cfg/sourcemod/plugin.timeleft-in-hostname.cfg

    Usage:

    You can either add {{timeleft}} in your hostname and it will replace it with the time thats left.

    Or you dont add anything and it will put the timeleft add the end of the hostname.

    Changelog:
    ## 1.5
    - [x] Fix: Use `OnConfigsExecuted` instead of `OnMapStart`

    ## 1.4
    - [x] New: when server is hibernating fallback to `mp_timelimit`
    - [x] Fix: when a map change occurs the timer would not stop and would infinitely add more timers
    - [x] Fix: when a map change occurs the time would not be set fast enough so you would see `{{timeleft}}` or no time.

    ## 1.3
    - [x] New: when the time is lower than 0 or is not set it will return the values back to `00:00`
    - [x] Fix: Fix the strange `29:58 15:23` issue

    ## 1.2
    - [x] Fix: Timeleft would get the wrong hostname after a map restart was initiated.

    ## 1.1
    - [x] Fixed an issue where the plugin had started but the hostname was not yet loaded into convar `hostname`
    - [x] Fixed an issue where the `{{timeleft}}` was not being changed if it was at the beginning of the hostname
    - [x] Increased speed by using `FormatEx` instead of `Format`

    ## 1.0
    - [x] Initial Release.

    https://github.com/AzaZPPL/Timeleft-in-Hostname
    Attached Files
    File Type: sp Get Plugin or Get Source (timeleft-in-hostname.sp - 721 views - 2.7 KB)

    Last edited by AzaZPPL; 02-18-2019 at 15:25.
    AzaZPPL is offline
    AzaZPPL
    Member
    Join Date: Dec 2014
    Old 08-02-2016 , 10:36   Re: [ANY] Timeleft in Hostname
    Reply With Quote #2

    Couldnt test so not sure if it works

    Feedback appreciated

    Last edited by AzaZPPL; 08-02-2016 at 10:45.
    AzaZPPL is offline
    j1gg
    Senior Member
    Join Date: Dec 2015
    Old 08-11-2016 , 08:00   Re: [ANY] Timeleft in Hostname
    Reply With Quote #3

    I have thus bug. Look on hostname http://www.gametracker.com/server_in....151.42:27016/
    __________________
    j1gg is offline
    AzaZPPL
    Member
    Join Date: Dec 2014
    Old 08-11-2016 , 10:44   Re: [ANY] Timeleft in Hostname
    Reply With Quote #4

    Quote:
    Originally Posted by j1gg View Post
    Are you using {{timeleft}}? Does it fix itself later on?

    I've included a new version. Check if it fixes the issue.

    Download above

    Last edited by AzaZPPL; 11-14-2016 at 12:34.
    AzaZPPL is offline
    Lord_Rofl
    Senior Member
    Join Date: Aug 2006
    Location: Bad Pyrmont, Germany
    Old 11-06-2016 , 09:39   Re: [ANY] Timeleft in Hostname
    Reply With Quote #5

    Nice work, but you have to improve the reset logic. When iam reloading the map then i have two times the timeleft counter and so on.

    Last edited by Lord_Rofl; 11-06-2016 at 09:39.
    Lord_Rofl is offline
    AzaZPPL
    Member
    Join Date: Dec 2014
    Old 11-06-2016 , 10:36   Re: [ANY] Timeleft in Hostname
    Reply With Quote #6

    Quote:
    Originally Posted by Lord_Rofl View Post
    Nice work, but you have to improve the reset logic. When iam reloading the map then i have two times the timeleft counter and so on.
    Thanks for the report. Could you help me a bit with your issue? Is it a command your executing when you are reloading the map? If, so which command?
    AzaZPPL is offline
    Lord_Rofl
    Senior Member
    Join Date: Aug 2006
    Location: Bad Pyrmont, Germany
    Old 11-06-2016 , 13:08   Re: [ANY] Timeleft in Hostname
    Reply With Quote #7

    Not really, i'm using the standard command (HLSW Map Change).
    Also happend when i left alone the server. Now i have 5 times the countdown.
    Lord_Rofl is offline
    AzaZPPL
    Member
    Join Date: Dec 2014
    Old 11-06-2016 , 15:15   Re: [ANY] Timeleft in Hostname
    Reply With Quote #8

    Quote:
    Originally Posted by Lord_Rofl View Post
    Not really, i'm using the standard command (HLSW Map Change).
    Also happend when i left alone the server. Now i have 5 times the countdown.
    Does it also hapen when using {{timeleft}}?
    AzaZPPL is offline
    Lord_Rofl
    Senior Member
    Join Date: Aug 2006
    Location: Bad Pyrmont, Germany
    Old 11-06-2016 , 18:50   Re: [ANY] Timeleft in Hostname
    Reply With Quote #9

    Not really use the {{timeleft}} pattern. But i will try it
    Lord_Rofl is offline
    AI_
    Member
    Join Date: Oct 2014
    Location: Canada
    Old 11-14-2016 , 00:06   Re: [ANY] Timeleft in Hostname
    Reply With Quote #10

    The new version still repeatedly adds the time to the end of the host name after map changes.

    For example, a host name set as "Server Name [{{timeleft}}] | Community" ends up as "Server Name [29:58] | Community29:58 29:58 29:58 29:58 29:58", etc.
    __________________

    Last edited by AI_; 11-14-2016 at 00:08.
    AI_ 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 02:23.


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