View Single Post
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 05-31-2022 , 12:15   Re: [L4D2] Does anyone know how to modify the reload speed of the shotgun ?
Reply With Quote #2

Read this:
https://forums.alliedmods.net/showthread.php?t=331064

The base plugin you need (Weapon Handling):
https://forums.alliedmods.net/showthread.php?p=2674761

Code:
#include <sourcemod>
#include <WeaponHandling>

public void WH_OnReloadModifier(int client, int weapon, L4D2WeaponType weapontype, float &speedmodifier)
{
    switch (weapontype)
    {
        case L4D2WeaponType_Pumpshotgun, L4D2WeaponType_PumpshotgunChrome: speedmodifier = speedmodifier * 1.25; // 25% faster reload
        case L4D2WeaponType_Autoshotgun, L4D2WeaponType_AutoshotgunSpas: speedmodifier = speedmodifier * 1.25; // 25% faster reload
    }
}
Compile this simple code by yourself if you know how to do it. Use weaponhandling.inc included inside the Weapon Handling plugin. Change 1.25; // 25% faster reload to the value you desired.
Toranks is offline