AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] FB Respawner - Disable/Enable Respawn Times [1.1.0] (https://forums.alliedmods.net/showthread.php?t=129827)

Unsichtbar 06-17-2010 09:24

[TF2] FB Respawner - Disable/Enable Respawn Times [1.1.0]
 
6 Attachment(s)
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

Spectro87 06-17-2010 10:15

Re: [TF2] FB Respawner - Disable/Enable Respawn Times
 
This sounds really cool. I'm looking forward to see some other replies of people using it on their server, though.

Mnkras 06-17-2010 12:08

Re: [TF2] FB Respawner - Disable/Enable Respawn Times
 
this can already be done by using Wozer's plugin with any of the other plugins that exec commands depending on how many players

Afronanny 06-17-2010 17:45

Re: [TF2] FB Respawner - Disable/Enable Respawn Times
 
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.

Unsichtbar 06-17-2010 18:06

Re: [TF2] FB Respawner - Disable/Enable Respawn Times
 
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 ;)

Unsichtbar 06-18-2010 04:48

Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.1]
 
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 06-24-2010 08:43

Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.2]
 
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.

Packhead 07-24-2010 20:37

Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.3]
 
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 07-24-2010 21:14

Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.3]
 
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.

Unsichtbar 07-28-2010 04:06

Re: [TF2] FB Respawner - Disable/Enable Respawn Times [1.0.4]
 
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.


All times are GMT -4. The time now is 07:30.

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