AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Intelligence Protector (https://forums.alliedmods.net/showthread.php?t=146309)

heffebaycay 12-26-2010 18:16

[TF2] Intelligence Protector
 
2 Attachment(s)
[TF2] Intelligence Protector




Description:

When enabled, this plugin will disable the intelligence and force any player carrying it to drop it.

If a player is carrying the intel when the plugin is activated, he will be forced to drop it, and the intel will disappear. Upon reactivation, the intelligence will re-appear at its last known location, with its timer being reset.

Known issue : after being teleported back, the circular intelligence timer won't be visible. Even though it is not visible, it is still working and the intel will eventually get back to its base.

Each use of the command !intelp is logged.

Screenshot : http://img825.**************/img825/5...protector2.png

Command:
  • !intelp - Toggle intelligence protection

ConVars:
  • sm_intelp_enabled <1/0> - Reports the status of this plugin (1=enabled, 0=disabled)
  • sm_intelp_version - Plugin version.


Note:

If a player was carrying the intelligence when an admin enabled this plugin, the briefcase will disappear but the "intelligence timer" will stay visible until intelligence protection is disabled by another admin.


Credits:
- Matthias Vance, for his plugin "[TF2] Intelligence Timer" that gave me some ideas on how to work with intelligence timers.

Version history:

1.1.2 (12/28/2010) :
- Once intel protection is disabled, the intel will be teleported back to its last known position.
- Removed cvar sm_intelp_delay, not needed anymore.

1.1.1 (12/28/2010) :
- Now using "ForceDrop" entity input to force players to drop the intelligence, instead of the client command "dropitem".
- Removed consts "Red_Team" and "Blu_Team".

1.1 (12/27/2010) :
- Now disabling the intel instead of forcing players to drop it.
- Removed kick and warning features since they aren't needed anymore.
- If a player is carrying the intel when the plugin is activated, intel position won't be lost.
1.0 (12/26/2010) :
- Initial release

snelvuur 12-27-2010 05:30

Re: [TF2] Intelligence Protector
 
In which situation would one use this plugin? Just curious..

heffebaycay 12-27-2010 06:09

Re: [TF2] Intelligence Protector
 
Quote:

Originally Posted by snelvuur (Post 1379907)
In which situation would one use this plugin? Just curious..

Basically, I wrote it for another server admin who is using a melee mode plugin. Essentially that forces players to focus on the melee fights, and not on the objective during the couple of minutes that this melee mode lasts.

psychonic 12-27-2010 07:44

Re: [TF2] Intelligence Protector
 
Quote:

Originally Posted by heffebaycay (Post 1379931)
Basically, I wrote it for another server admin who is using a melee mode plugin. Essentially that forces players to focus on the melee fights, and not on the objective during the couple of minutes that this melee mode lasts.

In that case, why not just disable the intel?

Code:
AcceptEntityInput(flagent, "Disable");

heffebaycay 12-27-2010 15:11

Re: [TF2] Intelligence Protector
 
Quote:

Originally Posted by psychonic (Post 1379994)
In that case, why not just disable the intel?

Code:
AcceptEntityInput(flagent, "Disable");

It hadn't even crossed my mind !

I've updated the plugin to disable the intelligence instead of forcing players to drop it.

To make it fair for players who might be carrying the intel when an admin enables this plugin, I've added a feature to avoid losing the intelligence once dropped. What it does basically : it alters the current intel timer value and add 20 minutes (default value) to it. Once disabled the original intel timer value is restored.
If you don't want to use this feature, just set sm_intelp_delay to 0.

SmackDaddy 12-27-2010 15:21

Re: [TF2] Intelligence Protector
 
Quote:

Originally Posted by psychonic (Post 1379994)
In that case, why not just disable the intel?

Code:
AcceptEntityInput(flagent, "Disable");

Could this be simply added to the melee mode plugin? If so, where in the source code would it go? Would love to have that happen.......thanks Psychonic!

Kevin_b_er 12-27-2010 19:55

Re: [TF2] Intelligence Protector
 
This plugin overlaps a lot with [TF2] Disable the Flag.

The tf2.inc already contains a reference to the two teams in TF2: TFTeam_Red and TFTeam_Blue.

The 'delay before returning' bit is kinda useless when you could just tell the flag entity the "ForceReset" input and it will auto-drop and auto-return.

heffebaycay 12-27-2010 20:22

Re: [TF2] Intelligence Protector
 
Quote:

Originally Posted by Kevin_b_er (Post 1380521)
This plugin overlaps a lot with [TF2] Disable the Flag.

Well the objective is the same, but the former plugin doesn't have an option to avoid losing the intel. Plus I've been told it could be interfering with stats plugins (if a player carries the intel when the plugin disables it, the player will still be able to cap).

Quote:

Originally Posted by Kevin_b_er (Post 1380521)
The tf2.inc already contains a reference to the two teams in TF2: TFTeam_Red and TFTeam_Blue.

Right, indeed: I'll fix that. :)

Quote:

Originally Posted by Kevin_b_er (Post 1380521)
The 'delay before returning' bit is kinda useless when you could just tell the flag entity the "ForceReset" input and it will auto-drop and auto-return.

I'm not sure I understood what you meant: how is that ForceReset input supposed to work ? Does it allow me to "freeze" the intel anywhere on the map ? (can't see anything about it on VDC "item_teamflag" page, that's why I'm asking.)

FaTony 12-28-2010 04:50

Re: [TF2] Intelligence Protector
 
http://tf2wiki.net/wiki/January_27,_2010_Patch

heffebaycay 12-28-2010 07:09

Re: [TF2] Intelligence Protector
 
Quote:

Originally Posted by FaTony (Post 1380757)

Thanks for the link! Just tried and it is not really the result I want :/

Basically I want the intel to stay where it was dropped, until I re-enable it. ForceReset will only bring it back to the intel room.

If anyone can think of a cleaner solution beside altering the intelligence timer, feel free to post it. Anyway, I've just updated the plugin with the consts fix.


All times are GMT -4. The time now is 01:57.

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