View Single Post
Author Message
chundo
Senior Member
Join Date: May 2008
Old 06-06-2008 , 16:23   TF2 Melee Mode v0.4 (8/25)
Reply With Quote #1

TF2 Melee Mode v0.4 (8/25)

When enabled, this plugin forces all players to use melee weapons. I
t solves a few issues with other melee plugins I've found:
  • Fixes exploit where if the user attempts to change class in spawn to the same class they already are, no events are fired but the game gives them all their weapons back (thanks bl4nk).
  • When melee mode is disabled, players immediately get their weapons back - they don't have to wait to respawn again.
CVars:

sm_meleemode_version - Plugin version.
sm_meleemode_enable - 1 is on, 0 is off. (default 0)

Using From Other Plugins:

I've included a meleemode.inc include which defines a "ForceMeleeMode(bool)" native, so that other plugins can enable/disable melee mode if they need to. I use this in a "Sudden Death Rules" plugin on my server.

Installing:

meleemode.smx -> addons/sourcemod/plugins/
meleemode.sp -> addons/sourcemod/scripting/
meleemode.inc (optional) -> addons/sourcemod/scripting/include/

If Custom Votes is installed:
meleemode.vote.cfg -> addons/sourcemod/configs/customvotes/

Changelog:

0.1 - Initial release
0.2 - Changed exploit-blocking method (thanks bl4nk)
0.3 - Fixed chat spam due to duplicate event hooks
0.4 - Fixed a few exploits that granted all weapons

Credits:

Thanks to bl4nk for Sudden Death Melee Redux, which gave me a jump-start on figuring out how to write this.
Attached Files
File Type: inc meleemode.inc (433 Bytes, 5851 views)
File Type: cfg meleemode.vote.cfg (209 Bytes, 5723 views)
File Type: sp Get Plugin or Get Source (meleemode.sp - 14928 views - 4.1 KB)

Last edited by chundo; 08-25-2008 at 18:20. Reason: Bad install instructions
chundo is offline