View Single Post
Author Message
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 10-26-2019 , 20:01   [L4D2] Upgrade Ammo Block - Grenade Launcher (1.4) [10-May-2020]
Reply With Quote #1



Related Plugins:

About:
  • Block the Grenade Launcher from picking up explosive or incendiary ammo.


Thanks:
  • larrybrains - For the idea and request.


CVars:

Saved to l4d2_upgrade_block.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d2_upgrade_block_allow "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d2_upgrade_block_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d2_upgrade_block_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d2_upgrade_block_modes_tog "0"

// When ammo pickup is blocked set upgrade pack glow to: 0=Off. 1=On.
l4d2_upgrade_block_glow "0"

// Prevent grenade launchers picking up ammo from: 1=Explosive Ammo. 2=Incendiary Ammo. 3=Both.
l4d2_upgrade_block_type "2"

// Upgrade Block plugin version.
l4d2_upgrade_block_version 

Changes:
Code:
1.4 (10-May-2020)
    - Blocked test commands.
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.
    - Various optimizations and fixes.

1.3 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.

1.2 (30-Oct-2019)
    - Fixed glow not turning off after map transition or when a new upgrade pack is spawned.

1.1 (28-Oct-2019)
    - Added cvar "l4d2_upgrade_block_glow" to turn glow on/off.

1.0 (27-Oct-2013)
    - Initial release.

Installation:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_upgrade_block.sp - 744 views - 12.6 KB)
__________________

Last edited by Silvers; 05-10-2020 at 08:24.
Silvers is offline