AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Quick Det [TFC] (https://forums.alliedmods.net/showthread.php?t=53432)

pizzahut 04-03-2007 10:31

Quick Det [TFC]
 
12 Attachment(s)
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.

Deviance 04-03-2007 10:51

Re: Quick Det [TFC]
 
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

pizzahut 04-03-2007 10:56

Re: Quick Det [TFC]
 
Removed.

Ramono 04-03-2007 11:02

Re: Quick Det [TFC]
 
Installed on my server.
Gj :)

Deviance 04-03-2007 11:03

Re: Quick Det [TFC]
 
Aight seems like an good plugin, gj! :)

Rapid1Fire 04-03-2007 16:01

Re: Quick Det [TFC]
 
I saw you writing about this plugin in the suggestion thread. Good to see you actually got it done. Good job :)

pizzahut 04-03-2007 18:08

Re: Quick Det [TFC]
 
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).

Ramono 04-04-2007 02:07

Re: Quick Det [TFC]
 
set_fail_state("TFC ONLY")

pizzahut 04-04-2007 13:08

Re: Quick Det [TFC]
 
Updated: Added check if the mod is TFC. Added info for players.

VEN 04-05-2007 08:03

Re: Quick Det [TFC]
 
Even if you going to set the plugin as failed better firstly register it.


All times are GMT -4. The time now is 19:42.

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