View Single Post
Author Message
AlliedModders Donor
Join Date: Jun 2008
Old 07-16-2010 , 22: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.

  • 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!
  • 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)
  • 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
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 (817 Bytes, 2550 views)
File Type: txt melee.phrases.txt (900 Bytes, 2912 views)
File Type: txt melee.txt (137 Bytes, 549 views)
File Type: sp Get Plugin or Get Source (melee.sp - 485 views - 16.7 KB)

Last edited by pheadxdll; 06-28-2018 at 20:08.
pheadxdll is offline