Raised This Month: $165 Target: $400
 41% 

[TF2] Melee Only


Post New Thread Reply   
 
Thread Tools Display Modes
Author
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Plugin ID:
1809
Plugin Version:
0.7
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Toggle melee only anytime during the game without any side effects.
    Old 07-16-2010 , 21:01   [TF2] Melee Only
    Reply With Quote #1

    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.

    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.
    Attached Files
    File Type: inc melee.inc (817 Bytes, 2329 views)
    File Type: txt melee.phrases.txt (900 Bytes, 2781 views)
    File Type: txt melee.txt (137 Bytes, 264 views)
    File Type: sp Get Plugin or Get Source (melee.sp - 132 views - 16.7 KB)
    __________________

    Last edited by pheadxdll; 06-28-2018 at 19:08.
    pheadxdll is offline
    j0sh77
    Senior Member
    Join Date: Jan 2010
    Old 07-17-2010 , 11:59   Re: [TF2] Melee only
    Reply With Quote #2

    Finally! Nice job...
    __________________

    j0sh77 is offline
    Aoxmodeus
    Junior Member
    Join Date: Apr 2010
    Location: Irvine, CA
    Old 07-17-2010 , 15:51   Re: [TF2] Melee only
    Reply With Quote #3

    Works like a freaking champ. Simple and elegant. Now running this on both my servers.

    -Aox
    Aoxmodeus is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 07-17-2010 , 17:42   Re: [TF2] Melee only
    Reply With Quote #4

    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?)
    __________________

    Last edited by retsam; 07-17-2010 at 18:00.
    retsam is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 07-17-2010 , 19:07   Re: [TF2] Melee only
    Reply With Quote #5

    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.
    __________________

    Last edited by pheadxdll; 05-08-2014 at 18:31.
    pheadxdll is offline
    Acksull
    Member
    Join Date: Jul 2008
    Old 07-22-2010 , 11:58   Re: [TF2] Melee Only
    Reply With Quote #6

    Very nice! Any chance you could make the medi-gun and kritzkrieg available too?
    __________________
    Axl's TF2 - Where 2fort is a BAD thing.
    66.150.188.34:27015
    Acksull is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 07-22-2010 , 23:53   Re: [TF2] Melee Only
    Reply With Quote #7

    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.
    __________________
    pheadxdll is offline
    Acksull
    Member
    Join Date: Jul 2008
    Old 07-23-2010 , 13:26   Re: [TF2] Melee Only
    Reply With Quote #8

    Thanks pheadxdll, you rock!
    __________________
    Axl's TF2 - Where 2fort is a BAD thing.
    66.150.188.34:27015
    Acksull is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 07-23-2010 , 14:36   Re: [TF2] Melee Only
    Reply With Quote #9

    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.

    Last edited by FlaminSarge; 07-23-2010 at 15:03.
    FlaminSarge is offline
    [PL]Luki
    Member
    Join Date: Jun 2009
    Old 07-26-2010 , 10:16   Re: [TF2] Melee Only
    Reply With Quote #10

    Can you add something like 'votemelee'?
    Also, you can make cvar with flags required for 'melee' command.
    [PL]Luki is offline
    Reply


    Thread Tools
    Display Modes

    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 17:01.


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