View Single Post
Plugin Info:     Modification:          Category:          Approver:   Geesu (62)
jsauce
Senior Member
Join Date: Aug 2004
Location: Fitchburg, MA USA
Old 12-31-2005 , 10: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 - 1882 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