Raised This Month: $51 Target: $400
 12% 

Quick Det [TFC]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Team Fortress Classic        Category:   Fun Stuff        Approver:   VEN (29)
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-03-2007 , 10:31   Quick Det [TFC]
Reply With Quote #1

This plugin for TFC removes the minimum delay from detonating the demoman's green-yellow pipebombs, useful for close range combat.

CVARs
quick_det_on : 1 = plugin enabled (default), 0 = plugin disabled
quick_det_info : If set to 1 (default), players will be informed that the plugin is active and what it does.

Required modules
- engine

Credits:
CheesyPeteza - I've reused the "showUsage" code from CP's Bunny Hop Enabler plugin.
EKS - for the Dump Ent Info tool.
More - for the original *private* plugin. (Neither source code nor binary is available.)
Ramono - for contributing code and ideas.

Version history:
0.1 Code to catch all three client commands.
0.2 Finds the pipebomb entities of the player.
0.3 Added code to detonate the pipebombs early.
1.0 Added comment section, check if player has a pipebomb launcher (not necessarily demoman as it's possible on some maps to pick up any weapon), CVAR to disable plugin, module check, renamed plugin.
1.0.3 Minor changes: Removed redundant code, removed module check (deprecated), using tfcconst.inc instead of tfcx.
1.1 Added check if the mod is TFC. Added info for players.
1.1.3 Minor changes: Added preprocessor line break. Removed <<return PLUGIN_CONTINUE>> command(s). Register plugin before setting fail state.

See also: TFC: Removing delay from detonating the demoman's pipe bombs.
Attached Files
File Type: sma Get Plugin or Get Source (quick_det.sma - 1636 views - 2.6 KB)
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.

Last edited by pizzahut; 04-05-2007 at 08:48.
pizzahut is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 04-03-2007 , 10:51   Re: Quick Det [TFC]
Reply With Quote #2

Code:
public plugin_modules()
{
  require_module("engine")
  require_module("tfcx")
}
plugin_modules() is deprecated, so there is no use to call this func.
http://www.amxmodx.org/funcwiki.php?...ules&go=search
Deviance is offline
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-03-2007 , 10:56   Re: Quick Det [TFC]
Reply With Quote #3

Removed.
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.
pizzahut is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 04-03-2007 , 11:03   Re: Quick Det [TFC]
Reply With Quote #4

Aight seems like an good plugin, gj!
Deviance is offline
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 04-03-2007 , 11:02   Re: Quick Det [TFC]
Reply With Quote #5

Installed on my server.
Gj
__________________
Um, hi.
Ramono is offline
Rapid1Fire
Junior Member
Join Date: Apr 2007
Old 04-03-2007 , 16:01   Re: Quick Det [TFC]
Reply With Quote #6

I saw you writing about this plugin in the suggestion thread. Good to see you actually got it done. Good job
Rapid1Fire is offline
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-03-2007 , 18:08   Re: Quick Det [TFC]
Reply With Quote #7

How would I go about handling if the plugin is accidently run using a different mod? Can I do something like
Code:
public plugin_init() {   if is_running("tfc") {     register_...   } else {     server_print("[AMXX] Quick Det requires TFC to run.^n")     server_cmd("amx_pausecfg stop quick_det.amxx")   } }
Keep in mind that no TFC native is used (only a constant), and that server_cmd is executed *after* plugin_init.

Also I might add an info message, so players know it's running and what it does (optionally, cvar controlled).
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.
pizzahut is offline
Old 04-03-2007, 18:35
Deviance
This message has been deleted by Deviance. Reason: what fucking ever
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 04-04-2007 , 02:07   Re: Quick Det [TFC]
Reply With Quote #9

set_fail_state("TFC ONLY")
__________________
Um, hi.

Last edited by Ramono; 04-06-2007 at 07:16.
Ramono is offline
pizzahut
Senior Member
Join Date: Oct 2004
Old 04-06-2007 , 07:04   Re: Quick Det [TFC]
Reply With Quote #10

Quote:
Originally Posted by Ramono View Post
set_fail_state("TFC ONLY")

The string in this line can't be to long, and I see you made it too long in the plugin.
Are you sure? When I do amxx plugins, the error is displayed in full length, in an extra line after listing all plugins.

L 04/06/2007 - 13:145: [AMXX] Plugin ("quick_det.amxx") is setting itself as failed.
L 04/06/2007 - 13:145: [AMXX] Plugin says: Quick Det requires TFC to run.
L 04/06/2007 - 13:145: [AMXX] Run time error 1 (plugin "quick_det.amxx") - forced exit

] amxx plugins
Code:
Currently loaded plugins:
       name                    version  author            file             status   
 [  1] Admin Base              1.76d    AMXX Dev Team     admin.amxx       running  
...
 [ 21] Quick Det               1.1.3    pizzahut          quick_det.amxx   error    
( 21) Error: Quick Det requires TFC to run.
21 plugins, 20 running
__________________
My AMXX plugins (content date 2007-03-29, link check 2017-04-26)

Plugins for the Royston Vasey TFC server - These are UNSUPPORTED, except those which have been published at AMX Mod X.

Last edited by pizzahut; 04-06-2007 at 11:18.
pizzahut is offline
Reply



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 13:55.


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