ok i got the weapons blocked from shooting.
now that i got a moment to think about it.. it's not going to work as i need it to cuz the code below blocks every weapons from shooting ofc not all(c4, he, flash, smoke, knife). so no animation of shooting will be played and no bullet will get shot out.
but i think what i need is make only the bullets decals to not be shown and the damage not get registered so it can be possible for me to make my idea, so get some help at it ?
/* some of the code was taken from Juice special thanks to him */
new const NO_RELOAD = (1<<2)|(1<<CSW_KNIFE)|(1<<CSW_C4)|(1<<CSW_HEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_SMOKEGRENADE);
const m_flNextPrimaryAttack = 46;
const m_flNextSecondaryAttack = 47;
const EXTRAOFFSET_WEAPONS = 4;
register_plugin("Block Weapons Attack", "1.0", "Juice/Hey");
for(new i = CSW_P228; i <= CSW_P90; i++)
if(NO_RELOAD & (1<<i))
get_weaponname(i, WeaponName, 23);
RegisterHam(Ham_Item_Deploy, WeaponName, "HamWeaponDeploy_Post", 1);
public HamWeaponDeploy_Post( iEnt )
set_pdata_float( iEnt, m_flNextPrimaryAttack, 9999.0, EXTRAOFFSET_WEAPONS );
set_pdata_float( iEnt, m_flNextSecondaryAttack, 9999.0, EXTRAOFFSET_WEAPONS );