AlliedModders

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

bl4nk 07-07-2009 04:29

[TF2] Melee Only
 
4 Attachment(s)
Melee Only
by bl4nk

CVars:
sm_meleeonly_enable "0" - Enable/Disable melee only.
sm_meleeonly_spykit "1" - Allow spies to use their disguise kit when melee only is enabled
sm_meleeonly_engytools "1" - Allow engineers to use their tools when melee only is enabled
sm_meleeonly_noncombat "1" - Allow non-combat related items (bonk, medigun, kritzkrieg, jarate)

Commands:
sm_meleeonly - Toggles melee only (requires the slay [f] flag).

Requirements:
SourceMod 1.3 or later.

Installation:
Download the plugin and place it in your ~/tf/addons/sourcemod/plugins/ folder.
Download the translation files and place it in your ~/tf/addons/sourcemod/translations/ folder.

Manually load the plugin, change the map, or restart the server for the plugin to be loaded.
Configure the cvars listed above in the ~/tf/cfg/sourcemod/plugin.meleeonly.cfg file to customize the plugin to your liking.

To Do:
  • Fix resupply locker bug.
  • Fix spies being able to use "lastdisguise" when they shouldn't be able to.
  • Fix engineers ability to quickly press buttons to be able to build something.
  • Command/cvar to disable resupply lockers.

Changelog:
  • 1.0.1
    • If melee only is enabled through map change, it's disabled at the start of the new map.
  • 1.0.2
    • Added the sm_meleeonly_noncombat cvar.
    • Enabling sm_meleeonly_engytools will allow spies to use their sappers (if enough people request, I can make this controllable by a cvar).
  • 1.1.0
    • Revamped admin menu; you can now configure all of the cvars inside the new menu.
    • Fixed the non-combat weapons being unusable when they should be.
    • Temporarily disabled the jarate from the non-combat weapon list as it exposes a bug
    • Updated the translation file to include some new menu-related phrases.
  • 1.1.1
    • Engineer buildings are destroyed when melee only is enabled and the engytools cvar is set to 0.
    • Engineer buildings are destroyed if the engytools is set to 0 when melee only is already enabled.
    • Initial spy disguise remove stuff added (still not functioning until the bug listed above is fixed).
  • 1.2.0
    • Fixed heavies not being able to use their sandwich when the noncombat cvar was set to 1.
    • Re-enabled the use of the jarate for noncombat weapons.
    • Added a new cvar to control whether or not melee-only is enabled (sm_meleeonly_enable). This makes it so when an admin uses the sm_meleeonly command, it will change the value of the cvar, which will then enable/disable melee only.
    • Disguised spies will have their disguises removed when the spykit cvar is disabled.
    • Added some command blocks to prevent players from disguising/building when not allowed to (there are still some loopholes to fix for this).

bl4nk 07-07-2009 04:37

Re: [TF2] Melee Only
 
For those who are wondering what's different about this plugin from other melee only plugins, here you go:

This plugin doesn't ever strip weapons from clients. It simply uses the new "OnPlayerRunCmd" forward that's provided in the newer SM builds to override player's changing weapons. Doing this allows melee only to be quickly enabled and disabled without having to deal with removing or modifying the ammunition of a weapon to get the same effect.

I tested it out, and I couldn't get it to switch to another weapon aside from my melee weapon no matter what.

retsam 07-07-2009 06:40

Re: [TF2] Melee Only
 
Hum.... Sounds like 1.3 is going to be pretty crazy... Nice work of course.(not that we use 1.3 yet)

bl4nk 07-07-2009 16:04

Re: [TF2] Melee Only
 
Updated to Version 1.0.1

DontWannaName 07-07-2009 16:43

Re: [TF2] Melee Only
 
Does it disable the weapon lockers?

bl4nk 07-07-2009 19:34

Re: [TF2] Melee Only
 
No, but it works with them. I tested it out, and it instantly switched right back to my melee weapon.

Sexual Harassment Panda 07-07-2009 19:34

Re: [TF2] Melee Only
 
Will definitely be trying this out.

Gachl 07-07-2009 20:08

Re: [TF2] Melee Only
 
Awesome, finally a plugin that supports the spy! I assume you can use your watch (invisibility / fakedeath)?

bl4nk 07-08-2009 00:26

Re: [TF2] Melee Only
 
Quote:

Originally Posted by Gachl (Post 866858)
Awesome, finally a plugin that supports the spy! I assume you can use your watch (invisibility / fakedeath)?

Yes, you can (I tested with cloak, but not the DR, but I assume that will work fine as well).

Anyways, added some new stuff; check out the OP for the changelog.

Updated to Version 1.0.2

I also added a To Do list (although there's only one thing on it currently).

bl4nk 07-08-2009 02:55

Re: [TF2] Melee Only
 
Updated to Version 1.1.0

There's quite a bit of changes in this version (see the changelog). Make sure when upgrading to also get the new translation file as well.


All times are GMT -4. The time now is 07:22.

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