Raised This Month: $32 Target: $400
 8% 

[TF2] Melee Only


Post New Thread Reply   
 
Thread Tools Display Modes
Author
bl4nk
SourceMod Developer
Join Date: Jul 2007
Plugin ID:
983
Plugin Version:
1.2.0
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Enables gameplay using only melee weapons
    Unapprover:
    Reason for Unapproving:
    broken; pending fix
    Old 07-07-2009 , 04:29   [TF2] Melee Only
    Reply With Quote #1

    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).
    Attached Files
    File Type: sp Get Plugin or Get Source (meleeonly.sp - 2680 views - 13.2 KB)
    File Type: txt meleeonly.phrases.txt (757 Bytes, 1112 views)

    Last edited by bl4nk; 08-08-2009 at 15:49.
    bl4nk is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 07-07-2009 , 04:37   Re: [TF2] Melee Only
    Reply With Quote #2

    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.
    bl4nk is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 07-07-2009 , 06:40   Re: [TF2] Melee Only
    Reply With Quote #3

    Hum.... Sounds like 1.3 is going to be pretty crazy... Nice work of course.(not that we use 1.3 yet)
    retsam is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 07-07-2009 , 16:04   Re: [TF2] Melee Only
    Reply With Quote #4

    Updated to Version 1.0.1
    bl4nk is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 07-07-2009 , 16:43   Re: [TF2] Melee Only
    Reply With Quote #5

    Does it disable the weapon lockers?
    __________________

    DontWannaName is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 07-07-2009 , 19:34   Re: [TF2] Melee Only
    Reply With Quote #6

    No, but it works with them. I tested it out, and it instantly switched right back to my melee weapon.
    bl4nk is offline
    Sexual Harassment Panda
    Veteran Member
    Join Date: Dec 2008
    Location: San Diego, CA
    Old 07-07-2009 , 19:34   Re: [TF2] Melee Only
    Reply With Quote #7

    Will definitely be trying this out.
    __________________
    Sexual Harassment Panda is offline
    Gachl
    BANNED
    Join Date: Feb 2009
    Old 07-07-2009 , 20:08   Re: [TF2] Melee Only
    Reply With Quote #8

    Awesome, finally a plugin that supports the spy! I assume you can use your watch (invisibility / fakedeath)?
    Gachl is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 07-08-2009 , 00:26   Re: [TF2] Melee Only
    Reply With Quote #9

    Quote:
    Originally Posted by Gachl View Post
    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 is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 07-08-2009 , 02:55   Re: [TF2] Melee Only
    Reply With Quote #10

    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.
    bl4nk 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 21:17.


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