teamflagreset plugin
Author: LouMan
Description: See below.
Min Version: Latest CVS 2.0 branch code (to compile), bzfs 2.0.8
** NOTE: the plugin is committed to CVS; can be obtained there.
Description:
This is the teamflagreset plugin. It will look at the team flags and see if they have been held by a player and dropped - if so, it will start timing to a limit. If the flag is not picked up again within that time limit the team flag will reset with a message saying which team flag sat idle too long. It will also automatically disable itself for teams with no players and for only 1 team in the match (no opposing teams).
There are 4 administrator commands available with the plugin:
"flagidletime m" this will set timer interval for checking idle flags to m minutes (1-120).
"flagidletimeoff" this will disable the timer.
"flagidletimeon" this will enable the timer.
"flagidletimestatus" this will return the status of the timer (enabled or disabled and time interval).
The plugin will also allow the time limit to be passed to it through the -loadplugin command line with bzfs. The format is as follows:
"-loadplugin <path>teamflagreset,m" where m is the timer value (in minutes) for timed ctf. For example,
"-loadplugin plugins/teamflagreset,2" would start the plugin with the timer set for 2 minutes. Again, the minimum is 1 minute and the maximum is 120 minutes. If no time is specified, the plugin defaults to 5 minutes.
Team Flag Reset
- LouMan
- Chief Sgt. of Cartography
- Posts: 338
- Joined: Mon Jan 31, 2005 3:05 am
- Location: Michigan, USA
Team Flag Reset
Last edited by LouMan on Wed Jan 31, 2007 8:52 pm, edited 8 times in total.
- CannonBallGuy
- Private First Class
- Posts: 2083
- Joined: Wed Apr 12, 2006 1:31 am
- Contact:
I'm not sure if this is much use, but an admin can reset an individual team flag with:
/flag reset R*
for a red flag, for example.
There may be a way to do such a thing in the API.
/flag reset R*
for a red flag, for example.
There may be a way to do such a thing in the API.
Merry Christmas!
"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."
"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007
Re: Team Flag Reset
Perhaps you deleted a command... but is that not only four commands, rather than five?LouMan wrote:There are 5 administrator commands available with the plugin:
"flagidletime m" this will set timer interval for checking idle flags to m minutes (1-120).
"flagidletimeoff" this will disable the timer.
"flagidletimeon" this will enable the timer.
"flagidletimestatus" this will return the status of the timer (enabled or disabled and time interval).
- LouMan
- Chief Sgt. of Cartography
- Posts: 338
- Joined: Mon Jan 31, 2005 3:05 am
- Location: Michigan, USA
This plugin has been upgraded to version 2.1
JeffM2501 added capability to individually reset flags to the API, so I modified code such that only the team flag that sits idle too long resets, instead of a general flag reset.
To use this plugin, you must obtain the latest CVS 2.0 branch code and compile a new bzfs application (and of course the plugin) with this latest branch code.
JeffM2501 added capability to individually reset flags to the API, so I modified code such that only the team flag that sits idle too long resets, instead of a general flag reset.
To use this plugin, you must obtain the latest CVS 2.0 branch code and compile a new bzfs application (and of course the plugin) with this latest branch code.