Very quickly recharged shotguns...
Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define m_pPlayer 41
#define m_fInReload 54
#define m_flNextReload 75
#define m_fInSpecialReload 55
#define m_flTimeWeaponIdle 48
#define m_flNextAttack 83
#define m_flNextPrimaryAttack 46
#define m_flNextSecondaryAttack 47
public plugin_init()
{
RegisterHam(Ham_Weapon_Reload, "weapon_m3", "reload_shotguns", 1)
RegisterHam(Ham_Weapon_Reload, "weapon_xm1014", "reload_shotguns", 1)
}
public reload_shotguns(ent)
{
static id; id = get_pdata_cbase(ent, m_pPlayer, 4)
static Float:time_reload; time_reload = 0.5
static special; special = get_pdata_int(ent, m_fInSpecialReload, 4)
if(!special)
{
time_reload *= get_pdata_float(id, m_flNextAttack, 5)
set_pdata_int(ent, m_fInSpecialReload, 1, 4)
set_pdata_float(id, m_flNextAttack, time_reload, 5)
set_pdata_float(ent, m_flTimeWeaponIdle, time_reload, 4)
set_pdata_float(id, m_flNextPrimaryAttack, time_reload, 5)
set_pdata_float(id, m_flNextSecondaryAttack, time_reload, 5)
}
else if(special == 1)
{
time_reload *= get_pdata_float(ent, m_flNextReload, 4)
set_pdata_int(ent, m_fInSpecialReload, 2, 4)
set_pdata_float(ent, m_flNextReload, time_reload, 4)
set_pdata_float(ent, m_flTimeWeaponIdle, time_reload, 4)
}
else set_pdata_int(ent, m_fInSpecialReload, 1, 4)
return HAM_SUPERCEDE
}