Spirit_12 Veteran Member Join Date: Dec 2012 Location: Toronto, CA

08-22-2018 , 01:24 Re: [L4D2] Melee In The Safe Room (with unlock all melee weapons on every campaign) L4D2- Melee In The Saferoom



Version: 3.0.0



Spawns a selection of melee weapons in the saferoom, at the start of each round.



Plugin Highlights:



Quote: - Fixed random option for versus games where second team wouldn't get the same set.



- Replaced "l4d2_MITSR_Random" Convar with "l4d2_MITSR_Spawn_Type".



- Pick between 0 = Custom weapon limits, 1 = Random weapon spawns and 2 = Map based. Third option will allow the plugin to spawn custom weapons unique to their own map.



- "l4d2_MITSR_MapBase_Amount" ConVar which sets the limit for each weapon upon Map Base option. This is a multiple, so make sure you don't set it too high.



- "l4d2_MITSR_Spawn_Type" ConVar also provides an alternative to downloading vpks, as you are only spawning weapons that are allowed on the map.



- "l4d2_MITSR_Debug" is implemented for event showcase. 0 = disable, 1 = Chat Messages and 2 = Log to file option.



- Given the history of the plugin. I wanted to keep it open to additional melee weapons. Current code allows you to add custom melee very easily.

Install Instructions:



Quote: - Place the file in your plugins folder.



- Delete the [L4D2]MeleeInTheSaferoom.cfg file in your left4dead2/cfg/sourcemod folder. Plugin will auto-create a new one with updated ConVars. ConVars:



PHP Code: // Number of baseball bats to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_BaseballBat "1"



// Number of cricket bats to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_CricketBat "1"



// Number of crowbars to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_Crowbar "1"



// 0 = off, 1 = Chat message, 2 = Log to file. Check logs/meleeinthesaferoom.txt

// -

// Default: "0"

// Minimum: "0.000000"

// Maximum: "2.000000"

l4d2_MITSR_Debug "0"



// Number of electric guitars to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_ElecGuitar "1"



// Should the plugin be enabled

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "1.000000"

l4d2_MITSR_Enabled "1"



// Number of fireaxes to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_FireAxe "1"



// Number of frying pans to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_FryingPan "1"



// Number of golf clubs to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_GolfClub "1"



// Number of katanas to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_Katana "1"



// Number of knifes to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_Knife "1"



// Number of machetes to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_Machete "1"



// Number multiple if l4d2_MITSR_Spawn_Type is set to 2.

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "4.000000"

l4d2_MITSR_MapBase_Amount "1"



// Number of weapons to spawn if l4d2_MITSR_Spawn_Type is set to 1.

// -

// Default: "10"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_Random_Amount "10"



// 0 = Custom list, 1 = Random Weapon and 2 = Map based weapons.

// -

// Default: "2"

// Minimum: "0.000000"

// Maximum: "2.000000"

l4d2_MITSR_Spawn_Type "2"



// Number of tonfas to spawn (l4d2_MITSR_Spawn_Type must be 0)

// -

// Default: "1"

// Minimum: "0.000000"

// Maximum: "10.000000"

l4d2_MITSR_Tonfa "1"



// The version of Melee In The Saferoom

// -

// Default: "3.0.0"

l4d2_MITSR_Version "3.0.0"

Change Log:



Quote: 3.0.0 (22-Aug-2018 - Major rewrite)

- Switched ConVar to support 3 options. (Custom limits, Random or Map Based)

- Switched to transitional syntax.

- Moved repetitive fucntions into loops and arrays for future expansion.

- Fixed Melee spawning for second team in versus.

- Added debugging support for the plugin.

- Implemented AskPluginLoad2 function to check if game = Left4Dead 2.



2.0.7

- 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)



2.0.6

- MasterMind420 posted a release which use MITSR 2.0.5 but with some new .vpk's to unlock weapons.

- Repackaged .zip file and updated PHP to correct version



2.0.5

- Add support for the sacrifice an no mercy.

- Fixed a bug where hunter arms could be spawned.



2.0.4

- Fixed a potential error where on campaign mode, melee weapons wouldn't spawn on any but the first map.



2.0.3

- 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.



2.0.2

- Now spawns the default weapons, except for knives. Where it spawns a huntingknife.



2.0.1

- Quick (failing) test



2.0.0

- 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 PHP.



1.2.6

- added tonfa to the cfg list of files.

- more sure sv_allowdownload is on.



1.2.5

- 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.



1.2.0

- 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.



1.1.1

- Right hopefully, hunter claws are 100% gone, now it finds out what weapons are aloud on that map, then picks from them.



1.1.0

- Changed how the weapons spawn, hopfully fixing the hunter claws once and for all (Thanks DJ_WEST)

- Fixed some typos

- Removed !mitserror

- NOTE: Please delete the old [L4D2]MeleeSafeRoom.cfg before using this plugin.

- NOTE: This version is broken, reuploaded 1.0.5



1.0.5

- 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.



1.0.4

- Added extra checking for spawn amounts.

- Made sure knifes worked for edited servers.



1.0.3

- A Quick Beta version used to check a hunter claws bug had been fixed.



1.0.2

- Fixed Bug with weapons spawning in wrong place

- Wrote better PHP for positioning and rotating melee weapons



1.0.1

- Small bug fix (increased timer from round start)



1.0.0

- Initial Release Credits:



Quote: - SilverShot for his coding format style.

- Fyren for his help with nested loops. Attached Files Get Plugin or Get Source (l4d2_melee_in_the_saferoom.sp - 484 views - 18.4 KB)

https://github.com/Satanic-Spirit/



Last edited by Spirit_12; 08-22-2018 at 22:21 .