View Single Post
Hanzoligen
Junior Member
Join Date: Feb 2013
Old 02-19-2013 , 15:36   Re: [L4D2] Weapon Remove
Reply With Quote #8

I altered the script to make it adjustable for each weapon.
It works for both L4D1 + 2.
You can set a general pick up limit if you don't feel like altering each weapon for its own. It's also possible to set a limit of "0" to remove specific weapons completely or use "-1" if you want infinite amount (l4d standard).

Thanks to Rain_orel for the initial plugin!

For the bugs above: I didn't encounter the script not working, although I restarted several times. Can you try again and report please?
I couldn't test the other bug (takes time to walk through the map). Each item spawn has it's unique ID. Unless that equals the ID of the gun you are holding it shouldn't get removed.

Edit: I noticed that if you change the limits you need to reload the map twice before they get applied. I have no idea why. Any hints are welcome.

Code:
// Note:
// a limit of "0" means that guns is removed
// ..limit_all is the limit for all weapons (0=disable general limit)
// which overrides weapon specific values below
// if they are set above this limit

l4d_weaponremove_enable "1"
l4d_weaponremove_limit_all "0"

l4d_weaponremove_limit_autoshotgun "1"
l4d_weaponremove_limit_hunting_rifle "1"
l4d_weaponremove_limit_pistol "2"
l4d_weaponremove_limit_pumpshotgun "1"
l4d_weaponremove_limit_rifle "1"
l4d_weaponremove_limit_smg "3"

l4d2_weaponremove_limit_grenade_launcher "1"
l4d2_weaponremove_limit_pistol_magnum "1"
l4d2_weaponremove_limit_rifle_ak47 "1"
l4d2_weaponremove_limit_rifle_desert "1"
l4d2_weaponremove_limit_rifle_m60 "1"
l4d2_weaponremove_limit_rifle_sg552 "1"
l4d2_weaponremove_limit_shotgun_chrome "1"
l4d2_weaponremove_limit_shotgun_spas "1"
l4d2_weaponremove_limit_smg_mp5 "1"
l4d2_weaponremove_limit_smg_silenced "1"
l4d2_weaponremove_limit_sniper_awp "1"
l4d2_weaponremove_limit_sniper_military "1"
l4d2_weaponremove_limit_sniper_scout "1"
Attached Files
File Type: sp Get Plugin or Get Source (l4d1-2_weaponremover_v1.02.sp - 2627 views - 10.6 KB)

Last edited by Hanzoligen; 02-19-2013 at 16:35.
Hanzoligen is offline