AlliedModders

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

pheadxdll 07-16-2010 21:01

[TF2] Melee Only
 
6 Attachment(s)
Melee Only
Toggle melee only anytime during the game without any side effects. Works with all game modes and configurations. Good to have when your players have an urge for a melee brawl. Just disable it and everything goes back to normal.

Features:
  • Exceptions for non-combat weapons: jarate, bonk, crit-a-cola, sandwich, steak, chocolate, buff banner, sappers, disguise kit, wrangler, mad milk, battalion's backup, concheror, rocket/sticky jumper, mediguns, short circuit, and all buildables.
  • Non-stop, unexploitable, melee on melee action!
Commands:
  • melee (set access with the melee_flag cvar)

    melee or !melee in chat will toggle melee mode.
    melee 1 or melee 0 will enable or disable melee mode respectively.
  • votemelee (set access with the melee_voteflag cvar)
Convars:
  • melee_healing (default 0) - 1/0 Enable or disable medic healing
  • melee_jumper (default 0) - 1/0 Enable or disable the sticky/rocket jumper.
  • melee_circuit (default 0) - 1/0 Enable or disable the short circuit
  • melee_flag (default "z") - Admins must have this flag to have access
  • melee_voteflag (default "z") - Admins must have this flag to use votemelee
  • melee_disabled (default 0) - Set this to 1 to disable melee from being turned on
  • melee_arena (default 0.0) - Set this between 0 and 1 to set the chance that an arena round will become melee. 0.25 = 25% chance.
  • melee_mode (default 0) - 0 - Allow non-combat weapons | 1 - Only allow weapons in the melee slot
  • melee_jetpack (default 0) - 1 - Allow thermal thruster | 0 - Disallow
Changelog:
Code:

0.1  - Initial release
0.1.1 - Added convar melee_healing to enable medic healing
      - Added the forgotten buff banner and removed the wrangler!
0.1.2 - Added convar melee_flags to set admin access
      - Fixed a bug with revenge crits
      - Added back the wrangler
0.2  - Renamed melee_flags to melee_flag
      - Added admin menu integration
      - Changed how weapons are switched, fixes numerous bugs, makes things smoother, but requires gamedata now.
      - Sentries can now be built, but they will not target.
0.2.1 - Fixed a glitch with the heavy's miniguns and switching to melee.
0.2.2 - Added voting through the votemelee command and the admin menu.
      - Added the convar melee_disabled, set to 1 to disable melee from being activated.
      - Added the convar melee_arena to set the chance that an arena round will be melee only.
0.2.3 - Added the convar melee_suddendeath to set whether melee should be enabled during sudden death. Default is off.
0.2.4 - Added the convar melee_mode to disallow the non-combat weapons.
0.2.5 - Added the mad milk and the battalion's backup
0.2.6 - Added the convar melee_suddendeath_class to force a class during melee sudden death.
      - Improved efficiency of the plugin!
      - Modified the melee vote to toggle.
      - Improved some wording for player messages.
0.2.7 - Installed natives for accessing melee mode in other plugins.
      - Removed the melee sudden death and moved it to this plugin.
      - Fixed minigun glitch when enabling melee during priming.
0.2.8 - Added translations.
      - Rewrote logic for detecting melee weapons.
      - Added melee_jumper for enabling the rocket/sticky jumper during melee.
0.2.9 - Added the buffalo steak and the concheror to the whitelist.
0.3  - Updated offsets for the uber update and added The Quick-Fix.
0.3.1 - Set tf_bot_melee_only accordingly on melee.
      - Added the 'Strange Medigun' to the healing whitelist.
0.3.2 - Added the fish cake to the whitelist.
0.3.3 - Added two natives: OnSetMeleeMode & OnMeleeArena.
0.3.4 - Added the Festive Medigun to the healing whitelist.
      - Fixed melee exploit with the Spy-Cicle.
0.3.5 - Fixed a problem with forcing melee on miniguns.
      - 3/6/12 - Updated the include file/plugin to register a library.
0.3.6 - Added the new sappers to the whitelist.
0.3.7 - Added melee_circuit for enabling the The Short Circuit during melee.
      - Voting results check sm_vote_progress_hintbox before showing hint text.
0.3.8 - Added the Red Recorder to the whitelist.
0.3.9 - Added the Robo-Sandvich to the whitelist.
0.3.91 - Added the Festive Sandvich and Festive Buff Banner to the whitelist.
0.3.92 - Added the Ap-Sap to the whitelist.
0.4  - Setting admin flag cvars blank now makes the command public.
0.4.1 - Grabs gamedata from SDKHook (SourceMod >=1.5 required)
0.4.2 - Added spell books, festive jarate, festive sapper, and festive wrangler to the whitelist.
0.5  - Added the grappling hook and festive bonk to the whitelist.
      - Changed gamedata to simplify plugin.
0.6 - Added the passtime gun to the whitelist.
0.7 - Added Second Banana, Thermal Thruster, Thermal Thruster, and Gas Passer to the whitelist.
      - Added the cvar melee_jetpack (default 0) to control use of the Thermal Thruster.


Install instructions:
1. melee.smx goes in sourcemod/plugins
2. melee.txt goes in sourcemod/gamedata
3. melee.phrases.txt goes in sourcemod/translations

Plugins that use this:
Melee Only - Sudden Death
Last Player Melee
Developers, we have natives! Use this plugin and I'll put you on the list. :grrr:

Some notes:

  • Melee mode will reset to off during map change.
  • If you wanted melee only on all the time, just place melee 1 in server.cfg or where ever you want.

j0sh77 07-17-2010 11:59

Re: [TF2] Melee only
 
Finally! Nice job...

Aoxmodeus 07-17-2010 15:51

Re: [TF2] Melee only
 
Works like a freaking champ. Simple and elegant. Now running this on both my servers.

-Aox

retsam 07-17-2010 17:42

Re: [TF2] Melee only
 
I was just curious, what made you want to use ongameframe for this? I guess all the other melee plugins have flaws in them?(I honestly dont use them so I dont know) It just seems like ongameframe could be avoided by just restricting the health lockers from working(which is what the others do?)

pheadxdll 07-17-2010 19:07

Re: [TF2] Melee only
 
Right, some history:

Yeah, the two other melee plugins have two approaches. One is to strip all but your melee weapons, and disable the ammo cabinets. This presents a problem when you want to return to normal gameplay. bl4nk's plugin which I used for awhile and is now unapproved used OnPlayerRunCmd to set the player's active weapon. Unfortunately, it can be exploited by touching an ammo cabnit. Plus none of those plugins do melee mode the way I wanted it.

For all the minimal code I use during OnGameFrame, its worth the performance trade off (or what very little there is). Another way to check weapons is SDKHook's client think hook, but it's not worth it. I'm keeping this clean and simple.

Acksull 07-22-2010 11:58

Re: [TF2] Melee Only
 
Very nice! Any chance you could make the medi-gun and kritzkrieg available too?

pheadxdll 07-22-2010 23:53

Re: [TF2] Melee Only
 
Acksull, at first I was reluctant to add healing because I think it's a cheap ploy in melee fights, people like to gripe about it. But I think it's a feature some may want so here you go, I made an update tonight. New version 0.1.1:

1. Added a convar melee_healing which by default is 0 (off). Set this to 1 if you want healing allowed.
2. I removed the wrangler (worthless if you can't build sentries) and added the buff banner I had completely forgotten. lol!

Feel free to make more feature requests. :)

Acksull 07-23-2010 13:26

Re: [TF2] Melee Only
 
Thanks pheadxdll, you rock!

FlaminSarge 07-23-2010 14:36

Re: [TF2] Melee Only
 
Just a request for party's sake, but can you either add back in the wrangler or add a cvar to enable the wrangler? Taunting with the gunslinger then quickly switching to the wrangler is very interesting to see, and wrangler Engies in meleemode can be quite hilarious.
Also, on the server I mostly play on, we have the "Goomba Stomp" mod. Is it possible to have a command to strip ALL weapons and just leave civilian poses that can only Goomba stomp, using this plugin?

Regardless, awesome plugin.

[PL]Luki 07-26-2010 10:16

Re: [TF2] Melee Only
 
Can you add something like 'votemelee'?
Also, you can make cvar with flags required for 'melee' command.


All times are GMT -4. The time now is 09:08.

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