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

[TF2] FB Respawner - Disable/Enable Respawn Times [1.1.0]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Unsichtbar
Member
Join Date: Oct 2007
Plugin ID:
1742
Plugin Version:
1.1.0
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    disable/enable respawn times depending on how much active players are on a server
    Old 06-17-2010 , 09:24   [TF2] FB Respawner - Disable/Enable Respawn Times [1.1.0]
    Reply With Quote #1

    FB Respawner

    This is a simple but useful plugin to enable and disable respawn times on TF2 servers depending on how much active players are on your server. Default setting is 12 so if less then 12 players are on your server this plugin will disable respawn times for you. If your server gets more populated over time and more then 12 players, this plugin will enable the default respawn times again (mp_disable_respawn_times 0/1).

    If only a few players around it makes sense disabling the respawn "waiting" timer to speed up gameplay. For this purpose i came up with this little plugin and because there was no yet made plugin (i was able to find) to control respawn behaviour depending on how much active players are on a server.

    CVars
    fb_respawner_minplayers (default: 12)
    Version History
    1.1.0 - Bugfixes and code redesign
    1.0.4 - No more chat spam on player (dis-)connects.
    1.0.3
    - Added "HookConVarChange" to allow on the fly change for "fb_respawner_minplayers"
    1.0.2
    - Player check on connection/disconnection, smarter code
    1.0.1 - Code changes suggested by Afronanny (thx), CVar added to be more userfriendly, some redesign;
    1.0.0 - Initial release
    Attached Files
    File Type: sp Get Plugin or Get Source (tf2_firebursts_respawn.sp - 2985 views - 1.8 KB)
    __________________


    Last edited by Unsichtbar; 09-29-2010 at 02:30. Reason: 1.0.4 > 1.1.0
    Unsichtbar is offline
    Spectro87
    Junior Member
    Join Date: Jun 2010
    Old 06-17-2010 , 10:15   Re: [TF2] FB Respawner - Disable/Enable Respawn Times
    Reply With Quote #2

    This sounds really cool. I'm looking forward to see some other replies of people using it on their server, though.
    Spectro87 is offline
    Mnkras
    Senior Member
    Join Date: Mar 2009
    Location: 127.0.0.1
    Old 06-17-2010 , 12:08   Re: [TF2] FB Respawner - Disable/Enable Respawn Times
    Reply With Quote #3

    this can already be done by using Wozer's plugin with any of the other plugins that exec commands depending on how many players
    __________________
    Mnkras is offline
    Afronanny
    Veteran Member
    Join Date: Aug 2009
    Old 06-17-2010 , 17:45   Re: [TF2] FB Respawner - Disable/Enable Respawn Times
    Reply With Quote #4

    First of all, you should correct that public cvar before a Plugin Approver sees it. Secondly, don't use GetMaxClients() - use MaxClients instead. Some cvars to control the interval and minimum players would be nice.

    I'd suggest reading this as it will explain many things you need to fix.

    Last edited by Afronanny; 08-23-2010 at 23:53.
    Afronanny is offline
    Unsichtbar
    Member
    Join Date: Oct 2007
    Old 06-17-2010 , 18:06   Re: [TF2] FB Respawner - Disable/Enable Respawn Times
    Reply With Quote #5

    I did that cvar this way on propose, not to track or be seen on the server, at least atm.

    Can a client be in game but not connected and not a fake? I would expect that a client check if he is in game can't be true if he is not connected after all, or not?

    True, it's not yet very user friendly because you have to hardcode the interval and amount of players. I guess i should work on that ;)
    __________________


    Last edited by Unsichtbar; 06-17-2010 at 18:11.
    Unsichtbar is offline
    Unsichtbar
    Member
    Join Date: Oct 2007
    Old 06-18-2010 , 04:48   Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.1]
    Reply With Quote #6

    I've changed and added all suggestions, it was not that much work but i guess the result is way more user friendly. Thank you Afronanny for your suggestions.
    __________________

    Unsichtbar is offline
    Unsichtbar
    Member
    Join Date: Oct 2007
    Old 06-24-2010 , 08:43   Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.2]
    Reply With Quote #7

    1.0.3 is the latest version, just added a hook for the fb_respawner_minplayers convar so admins can change settings for min/max players on the fly and not have to wait for a (dis)connecting player. If there are no bugs i would say it's final.
    __________________

    Unsichtbar is offline
    Packhead
    Member
    Join Date: Dec 2007
    Old 07-24-2010 , 20:37   Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.3]
    Reply With Quote #8

    The only thing missing for me was that it didn't create it's own config file (I prefer plugins to have their own config files), so I added the AutoExecConfig function and I'm happy. Maybe something to add (I know it's only two cvars, but I'm stupid like that. )
    Packhead is offline
    Packhead
    Member
    Join Date: Dec 2007
    Old 07-24-2010 , 21:14   Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.3]
    Reply With Quote #9

    Also, another problem is that every time a player connects/disconnects it evaluates and prints Respawn Enabled/Disabled. I could see printing it once you flip it on or off, but not every time.
    Packhead is offline
    Unsichtbar
    Member
    Join Date: Oct 2007
    Old 07-28-2010 , 04:06   Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.4]
    Reply With Quote #10

    Thank you Packhead. You are absolutely right, this permanent chat output could be annoying on a server with lots of ative players (dis-)connecting. There is anough chat spam these days, so i added a few lines in 1.0.4.
    __________________

    Unsichtbar 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:51.


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