Melee In The Saferoom
This simply spawns a number of melee weapons at the start of each round in the safe-room. I wrote this plugin just after 'The Passing' release as during this update valve thought it would be a good idea to have between 2 - 4 melee weapons in the safe-room, meaning sometime people had to use pistols...
How it works is it waits for a round to begin, then take the first active client from the survivors team and spawns X amount of melee weapons around this point.
How To Install
If you don't want all the melee weapons unlocked, simply copy the [L4D2] MeleeInTheSafeRoom.smx to your servers sourcemod/plugins folder.
If you want all melee weapons to be unlocked, download any one of the
- Melee In The Safe Room Version 2-*-*.zip
then extract all the files to there relevant folders on your server.
How I Unlocked All Melee Weapons
Basically, there is a melee_weapon_unlock.vpk that contains all the mission.txt files (1,2,3,4,5 & 6) that have a line in which list the melee weapons that are aloud on that campaign. I added all melee weapons that weren't in the list, but with a modded script. so for example if the fireaxe isn't available on a campaign then i have added fireaxe_mod, making l4d2 spawn a fireaxe_mod melee weapon. To make these "mod" melee weapons work, I edited the melee_manifest.txt and added all of the modded script locations. Then because valve have changed how vpk's load, I added all the modded scripts to the left4dead2/scripts/melee directory. Now when a client connects to the server, the modded scripts are downloaded to each client. There are 12 scripts at around 4kb each, so it will take 5 - 10 seconds for them to download, but once the client has the scripts they will never need download them again (unless they delete them).
Spawn Random Weapons (1) or custom list (0)
Number of weapons to spawn if l4d2_MITSR_Random is 1
Number of baseball bats to spawn (l4d2_MITSR_Random must be 0)
*Note: Cvars for every class of melee weapon exist, but adding another 11 sections to this page seems silly. Look in [L4D2] MeleeInTheSaferoom.cfg for the full list.
Small bug fix (increased timer from round start)
Fixed Bug with weapons spawning in wrong place
Wrote better code for positioning and rotating melee weapons
A Quick Beta version used to check a hunter claws bug had been fixed.
Added extra checking for spawn amounts.
Made sure knifes worked for edited servers.
Changed hunter claws check to check all cases (lower and higher caps)
added !mitserror command to output all weapon models spawned to help with debugging.
Changed how the weapons spawn, hopfully fixing the hunter claws once and for all (Thanks DJ_WEST)
Fixed some typos
NOTE: Please delete the old [L4D2]MeleeSafeRoom.cfg before using this plugin.
NOTE: This version is broken, reuploaded 1.0.5
Right hopefully, hunter claws are 100% gone, now it finds out what weapons are aloud on that map, then picks from them.
Been a while since an update, and this isn't anything big, basically I've added an extra cvar for versus mode, if enabled both teams get the same melee weapons when set to random, to make it fair.
After many internal versions, trying to fix the glitches with unlocked melee weapons, I finally have one, which I believe works in all game modes. Basically, put the unlock_melee_weapons.vpk in your servers addon folder and this then downloads the individual files from the server to you clients on map start, because there all .txt files there all around 1 - 2kb each so they download instantly, enabling all melee weapons with no glitches and with audio.
added tonfa to the cfg list of files.
more sure sv_allowdownload is on.
Complete rewrite, from a blank document.
Fixed all errors (hopefully, tested for on all campaigns with two people with no errors)
Made all Melee weapons work with out any glitches (read how to setup for more information)
Now supports custom melee lists, e.g. spawn 4 knives, 1 golf club and 3 katans.
Cleaner faster code.
Quick (failing) test
Now spawns the default weapons, except for knives. Where it spawns a huntingknife.
Added riot_shield to make sure people can get riot shields to spawn properly.
added !melee (admin command) to list all spawnable melee weapons on current campaign
Fixed a potential error where on campaign mode, melee weapons wouldn't spawn on any but the first map.
Add support for the sacrifice an no mercy.
Fixed a bug where hunter arms could be spawned.
MasterMind420 posted a release which use MITSR 2.0.5 but with some new .vpk's to unlock weapons.
Repackaged .zip file and updated code to correct version
Made my own vpk with only standard melee weapons unlocked (no knife or riot shield).
Precached all standard melee weapons.
(it looks like without having something client side, knife and riot just won't work)