Raised This Month: $4 Target: $400

[L4D2] Gun Control

Post New Thread Reply   
Thread Tools Display Modes
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Plugin ID:
Plugin Version:
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Old 12-17-2009 , 18:34   [L4D2] Gun Control
    Reply With Quote #1

    A plugin to manage some gun and ammo related things.

    • Creates a cfg in which you can configure all L4D2 max ammo settings.

    • Adds a CVAR which lets you control Players ability to resupply their Grenade Launcher or a M60 at an ammo dump

    • Allows you to scavenge dropped guns for contained ammo. Say you all had lasered AKs, youre all nearly dry on ammo, you come across new guns, your mates grab some. They dropped their AKs which still contain 30-50 rounds each. But you refuse!! to let go of your favourite pwnage utility. You can now pick them up to get the contained ammo reserves.

    • Adds Console Command "give_ammo" which will give the friend youre looking at, and has the same gun, your current clip or whatever he needs of it.

    • Now allows players to gain multiple upgraded ammo clips when using an Ammo Pack.


    l4d2_guncontrol_assaultammo (default 360) - ammo for assault rifles
    l4d2_guncontrol_smgammo (default 650) - ammo for SMGs
    l4d2_guncontrol_shotgunammo (default 56) - ammo for pump shotguns
    l4d2_guncontrol_autoshotgunammo (default 90) - ammo for automatic shotguns
    l4d2_guncontrol_huntingrifleammo (default 150) - ammo for the HR
    l4d2_guncontrol_sniperrifleammo (default 180) - ammo for the Milit. Sniper, AWP, and Scout
    l4d2_guncontrol_grenadelauncherammo (default 30) - ammo for the Grenade Launcher
    l4d2_guncontrol_m60ammo (default 150) - ammo for the M60

    l4d2_guncontrol_allowgrenadereplenish (default 1) - allow Grenade Launcher Resupply at Ammo Dumps
    l4d2_guncontrol_allowm60replenish (default 1) - allow M60 Resupply at Ammo Dumps

    l4d2_guncontrol_incendammomulti (default 3) - how many clips of incendiary ammo you get off an ammopack
    l4d2_guncontrol_explosiveammomulti (default 1) - how many clips of explosive ammo you get off an ammopack

    l4d2_guncontrol_turnGLintoM60chance (default 2) - Turns GL spawns on all maps into M60 spawns. Works as chance setting. 1 is FULL/100% chance, 2 is half/50% chance, 3 one third and so on

    Version History:
    1.0.0 - initial release
    1.0.1 - added Convar Hooks for live changes, can now be loaded live
    1.0.2 - added upgraded ammo multiplier
    1.0.3 - fixed Laser Upgrade Chat Messages
    1.0.4 - *ahem* fixed it really this time
    1.0.5 - added support for CSS guns
    1.0.6 - split explosive and incendiary special ammo handling
    1.0.7 - never released
    1.0.8 - added M60 control and conversion convars
    1.0.9 - fixed M60 precache worries, you MUST have the appended Weapon Unlock for it to work
    1.1.0 - added delay for M60 replacement to prevent crashes
    1.1.1 - fixed 'replace all' typo preventing M60 resupply to work
    1.1.2 - fixed m_iAmmo offsets Valve broke with The Passing
    22.06.10 - updated Weapon Unlock to fix incompatibility with srsmod
    24.06.10 - updated Weapon Unlock to basically work in any mode
    25.06.10 - updated Weapon Unlock to version 0.8.7, now directly linked with srsmod if its installed
    1.1.3 - fixed small error with grenade launcher removal, enforce m60 ammo setting on replacement m60 guns
    10.03.11 - updated Weapon Unlock to version 0.8.9, hopefully fixes invalid Edict error log

    Credit to Crimson_Fox for fussing around with hidden guns
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_guncontrol.sp - 16060 views - 22.4 KB)
    File Type: sp Get Plugin or Get Source (l4d2_WeaponUnlock.sp - 10173 views - 22.1 KB)

    Last edited by AtomicStryker; 03-09-2011 at 18:44.
    AtomicStryker is offline
    Senior Member
    Join Date: Jun 2009
    Old 12-17-2009 , 19:02   Re: [L4D2] Gun Control
    Reply With Quote #2

    Your also a genius!

    maybe a short chat command for give ammo. perhaps !ga

    Last edited by triggerman; 12-17-2009 at 19:07.
    triggerman is offline
    New Member
    Join Date: Dec 2009
    Old 12-17-2009 , 21:30   Re: [L4D2] Gun Control
    Reply With Quote #3

    Will be trying this out soon along with porting over l4d maps, hope it works well. Will report any issues that I find.
    manbeast77 is offline
    AlliedModders Donor
    Join Date: Nov 2009
    Old 12-17-2009 , 21:49   Re: [L4D2] Gun Control
    Reply With Quote #4

    Atomic, I want to know what goes through your head when you think up plugins like these. You've made so many plugins that are awesome...

    I'm jealous.
    JackieChan is offline
    Junior Member
    Join Date: Sep 2009
    Old 12-17-2009 , 22:27   Re: [L4D2] Gun Control
    Reply With Quote #5

    Any way to add in the ability to adjust the reload speed?
    Siezmik is offline
    Senior Member
    Join Date: Nov 2009
    Old 12-18-2009 , 02:03   Re: [L4D2] Gun Control
    Reply With Quote #6

    other than grenade launcher are not working. i x2 the grenade launcher ammo 30>60 it shows i don't know it can work the another extra 30. which means 70% not working the replenish grenade ammo working. so on

    Edit: I take back my word its working >.<

    Last edited by Acecombat2; 12-18-2009 at 04:41.
    Acecombat2 is offline
    Join Date: Nov 2009
    Location: The Republic of Korea
    Old 12-18-2009 , 03:21   Re: [L4D2] Gun Control
    Reply With Quote #7

    Very easy !
    ldoh0112 is offline
    Join Date: Nov 2009
    Location: Brazil
    Old 12-18-2009 , 04:53   Re: [L4D2] Gun Control
    Reply With Quote #8


    Testing now!
    FuzzOne is offline
    Send a message via MSN to FuzzOne
    [email protected]
    New Member
    Join Date: Dec 2009
    Old 12-18-2009 , 14:57   Re: [L4D2] Gun Control
    Reply With Quote #9

    good idea~ i like it and want more~

    will you add more features such as zombie's health ,tank health setting~....
    proprop5856@sina.com is offline
    Senior Member
    Join Date: Dec 2009
    Old 12-18-2009 , 15:28   Re: [L4D2] Gun Control
    Reply With Quote #10

    You are a scholar and a gentleman!!

    Amazing plugin...i hate having to switch guns once i get the AK or Scar

    The give ammo function is also a great idea.

    I like to drink beer and shoot stuff. Video games are fun too i guess!
    Newf is offline

    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 13:54.

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