Raised This Month: $100 Target: $400
 25% 

Timelimit Protection v. 1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Geesu (62)
jsauce
Senior Member
Join Date: Aug 2004
Location: Fitchburg, MA USA
Old 12-31-2005 , 11:11   Timelimit Protection v. 1.0
Reply With Quote #1

This plugin allows a server owner to protect the server from any admin setting the timelimit to something too high or to none at all. I know on my server admins like to join the server, change the map and set the timelimit to something insane and leave after a while. This usually leaves the users helpless to have to deal with whatever map is being played for however long the time limit is set to.

What this plugin actually does is check the timelimit every 60 seconds against a preset time set by the server owner. If the time the map has been played exceeds the time the owner has set, the map will be forced to change to whatever the next map is in the cycle. Because this plugin keeps the amount of times each time the timelimit was checked, number of times * the set_task of 60.0 this allows the map to be changed even if the mp_timelimit has been set to 0.

Code:
#define MAX_TIMELIMIT 90.0 // Define this as the maximum amount of time a map can stay on.

This allows the server owner to compile the plugin to whatever max timelimit he wants per map. I chose not to make this a cvar otherwise an admin could just change this defeating the purpose of the plugin.
Attached Files
File Type: sma Get Plugin or Get Source (timelimit_protection.sma - 1611 views - 1.8 KB)
__________________
"Those people who think they know everything are a great annoyance to those of us who do." -- Isaac Asimov

The Saucy Blog
jsauce is offline
Send a message via ICQ to jsauce Send a message via AIM to jsauce Send a message via MSN to jsauce
Dizzy
Veteran Member
Join Date: Jun 2004
Location: Massachusetts
Old 01-03-2006 , 10:54  
Reply With Quote #2

Ummm... maybe you could just take away their sv_cvar commands...

Ehhh. I guess that limits them though...

Seems like a good idea... I think it needs to develop a bit more...
__________________
My Plugins

Purchase Mod - Stable
Type Sounds - Stable
Monster Spawner - Stable
Nade Giver - Maintenance
Dizzy is offline
Send a message via AIM to Dizzy
jsauce
Senior Member
Join Date: Aug 2004
Location: Fitchburg, MA USA
Old 01-03-2006 , 11:15  
Reply With Quote #3

develop what? It does exactly what its intended to do, it prevents an admin from putting a map on too long. I designed it because admins who like certain maps are notorious for switching to them, such as scoutknivez and just leaving it there for hours.
__________________
"Those people who think they know everything are a great annoyance to those of us who do." -- Isaac Asimov

The Saucy Blog
jsauce is offline
Send a message via ICQ to jsauce Send a message via AIM to jsauce Send a message via MSN to jsauce
Geesu
AMX Mod X Plugin Approver
Join Date: Mar 2004
Location: Cincinnati, OH
Old 01-03-2006 , 13:29  
Reply With Quote #4

Nice plugin, what would be cooler though is if it would work with any cvar... i.e.

read in a file that contains the cvar name, then the value... like:

"sv_timelimit" "60"
"sv_gravity" "250"

And checks them all every 60 seconds
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
jsauce
Senior Member
Join Date: Aug 2004
Location: Fitchburg, MA USA
Old 01-03-2006 , 19:38  
Reply With Quote #5

Thats actually interesting. Is there a complete list of server cvars. I could easily just write one that could protect them all.

I think the thing with it though is that normally all the cvars are reset on mapchange anyway so unless you set really low values or enforce the timelimit it wouldn't be needed. I suppose if you simply wanted to restrict the use of certain cvars you could do that.
__________________
"Those people who think they know everything are a great annoyance to those of us who do." -- Isaac Asimov

The Saucy Blog
jsauce is offline
Send a message via ICQ to jsauce Send a message via AIM to jsauce Send a message via MSN to jsauce
@omik][Fusion
Member
Join Date: Nov 2005
Location: Killeen,Tx
Old 01-15-2006 , 20:06  
Reply With Quote #6

I am very interested in this plugin, since for some reason, when i go from dust to scouts, the timelimit changes as well. I was wondering how this effects map extending? If the map has been on too long, does it just change the map? Maybe if its been on too long, it could just start the map vote, since i like the map votes and it would be better if the players would actually want to stay on the map. Hmmm, ill take a look at the sma while i wait for a response
@omik][Fusion is offline
jsauce
Senior Member
Join Date: Aug 2004
Location: Fitchburg, MA USA
Old 01-24-2006 , 20:49  
Reply With Quote #7

The plugin was specifically designed to prevent a map from being played for longer than the time you specify in the plugin before compile. I designed it because some admins like to either set the timelimit to 999999 or 0 and leave. This annoys everyone. There is a reason for the mp_timelimit and mapcycle. So I designed this to fix that problem. No matter what time they set it to or even if they turn the time limit completely off the map will automatically be changed once the timelimit you specified is reached. It doesn't vote, it tells everyone its changing and then changes it.
__________________
"Those people who think they know everything are a great annoyance to those of us who do." -- Isaac Asimov

The Saucy Blog
jsauce is offline
Send a message via ICQ to jsauce Send a message via AIM to jsauce Send a message via MSN to jsauce
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 11:50.


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