View Single Post
Author Message
Crimson_Fox
Senior Member
Join Date: Mar 2009
Old 01-03-2010 , 11:14   [L4D2] Weapon Unlock v0.8.1
Reply With Quote #1

Ever think to yourself "I wish Left 4 Dead 2 was more like Counter-Strike"? No? Well me neither, but I ended up writing this plug-in anyway. =P

As you may already know, Valve had to reduce the gore in the German version of L4D2. This was because otherwise they would not be allowed to ship L4D2 there. So in order to compensate, Valve added four Counter-Strike Source weapons to the German version. Unfortunately, those weapons were never enabled for everyone else.

Well folks, you can now have your strudel and eat it too!

Coop/Realism: CSS guns added to dynamic gun spawns with the exception of c4m1-c4m4.
Versus: CSS guns added to dynamic gun spawns. Weapons kept the same for both teams.
Scavenge: All static gun and grenade spawns randomised each round with CSS guns added. Weapons kept the same for both teams.
L4D1 maps: All static gun and grenade spawns randomised. L4D2 guns, CSS guns, and boomer bile added.

Weapon types are kept the same when randomised. For example, a sub machine gun will never be replaced with auto shotgun or an assault rifle. It will be replaced with another SMG such as an uzi, a silenced SMG, or an mp5.

Cvars:
l4d2_wu_enable, Is Weapon Unlock plug-in enabled?, default 1
l4d2_wu_awp, Enable AWP sniper rifle?, default 1
l4d2_wu_mp5, Enable MP5 submachine gun?, default 1
l4d2_wu_scout, Enable Scout sniper rifle?, default 1
l4d2_wu_sg552, Enable SG552 assault rifle?, default 1
l4d2_wu_awpboost, Amount of damage added to the AWP sniper rifle., default 135 (base 115+135=250 total at 1.05 sec cycle time vs special infected)
l4d2_wu_scoutboost, Amount of damage added to the scout sniper rifle., default 110 (base 90+110=200 total at 0.9 sec cycle time vs special infected)

To do:
Add support for 8+ player servers.
Add proper support for baseball bats and knives.
Find a method to lower the reload speed for the MP5/Sig.
Add cvars to enable/disable the plug-in by game mode.

If you need help getting this installed this plug-in try this tutorial: http://forums.alliedmods.net/showthread.php?t=69092

Changelog:
0.8.1
-Added precache for boomer bile.
0.8
-Added cvar to enable/disable plug-in.
0.7
-Added support for scavenge.
-Fixed c4m5 crash.
Thanks to McFlurry for the heads-up.
-Removed bat option as it's pretty glitchy at the moment.
0.6
-Added support for L4D1 maps.
-Tweaked round detection for Versus.
-Added model precache for bats.
0.5.2
-Using new method of spawning bats.
0.5.1
-Readded map reload on plug-in load for dedicated servers as it is still required in some instances.
0.5
-Added config file.
Thanks to satannuts for looking this up.
0.4.5
-Fixes problems with wrong weapon models in versus by using a new method to store/retrieve weapon spawns.
0.4.4
-Map reload on plug-in load is not required for dedicated servers. Will now only reload map on plug-in load for listen servers.
0.4.3
-Added small fix for baseball bats.
Thanks to satannuts for the bug report.
-Disabled modifying spawns for co-op modes in c4m1-4 as the transitions keep causing crashes.
Thanks to everyone that reported the crashes.
0.4.2.0
-Fix for wrong model bug that showed up in 0.4.1.
Thanks to M249-M4A1 for the heads-up.
0.4.2
-Updated Hard Rain coop/realism map transition code. Should hopefully stop crashes on windows servers.
0.4.1
-Tweaked weapon initialisation to prevent crash on plug-in refresh.
Thanks to RenegadeXR for the heads-up.
-Lowered default AWP boost.
-Added check to boost code to prevent errors.
0.4
-Added options to boost CCS sniper rifle damage.
0.3.9
-Added fix for Hard Rain, should not crash on any map.
Thanks to chunXray for the bug reports.
-Fixed a typo on weapon spawn bug fix for c4m1_milltown_a.
Thanks again to SkaP for the bug report.
-Fixed a few bugs related to weapon initialisation.
0.3.8
-Rewrote fix for sugarmill_a -> sugarmill_b. Should be more stable on windows servers now.
-Updated weapon spawn bug fix for c4m1_milltown_a, will work on windows servers now.
0.3.7.2
-Even further fixes for weapon spawn bug.
-Increased delay for RoundStart again as it was still not long enough for some map transitions.
0.3.7.1
-Further fixes for weapon spawn bugs.
Thanks to Visual77 for the bug reports.
0.3.7
-Added versus weapon spawn fix for c4m1_milltown_a.
Thanks to SkaP for the bug report.
0.3.6
-Moved precache function to prevent crashes for windows servers.
-Added check to skip changing weapons on sugarmill_a since it causes listen servers to crash.
-Added fix for c2m5_concert, would cause weapons to glitch for the second team in versus.
Thanks to SkaP for the bug report.
-Increased RoundStart delay as it wasn't long enough for some setups.
0.3.5
-Optimised and re-wrote the spawn modification code. Should resolve the problems with weapons not matching up with their models.
0.3.4
-Removed round_start check as it caused the plug-in not to run at startup.
-Added check to prevent duplicate bats from being given out.
0.3.3
-Added option to give baseball bats to the survivors at the start of the round.
Thanks to SkaP for the suggestion.
-Added check for coop modes (coop, realism), will now spawn weapons in different locations if the survivors are wiped out.
Thanks to Daewa for the heads-up.
-Added check to prevent round_start from being triggered more than once per round.
-Removed exception for c4m3_sugarmill_b as it's problematic.
0.3.2
-Added exception for c4m3_sugarmill_b so that same weapons are kept.
0.3.1
-Fixed the c4m2_sugarmill_a -> c4m3_sugarmill_b crash.
Thanks to everyone that reported this.
0.3
-Added support for versus, now both teams get the same set of weapons.
Thanks to everyone that tested this.
-Tweaked model precaching, should fix crashing problems. *again*
Thanks to everyone who post a bug report. *again* =)
-Added cvars to enable/disable individual weapons.
Thanks to Cuthbert for the suggestion.
0.2.2
-Optimised code, will be easier to add features.
-Rewrote initialisation. Should stop crashes on windows dedicated servers and work better for listen servers.
0.2.1
-Fixed a few bugs I added in the hidden weapon initialisation. =P
0.2
-Added precache of hidden weapon models to prevent crashes.
Thanks to MagnoT for the heads-up.
-Updated hidden weapon initialisation so that sb_all_bot_team isn't disabled if it was previously set.
0.1
-Initial release.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_WeaponUnlock.sp - 64505 views - 21.2 KB)

Last edited by Crimson_Fox; 04-05-2010 at 19:44.
Crimson_Fox is offline