Thanks ark
I had to add a hook on primary attack post because apparently using primary attack resets the offset value.
Tested and working
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
public plugin_init()
{
RegisterHam( Ham_Item_Deploy , "weapon_m4a1" , "fw_Ham_BlockSilencer" );
RegisterHam( Ham_Weapon_PrimaryAttack, "weapon_m4a1", "fw_Ham_BlockSilencer" , 1 );
}
public fw_Ham_BlockSilencer( iEnt )
{
set_pdata_float( iEnt , 47 , 9999.0 );
}
__________________