Code:
public plugin_init()
{
new wname[32]
for( new i = CSW_P228; i <= CSW_P90; i++ )
{
if( i != 2 )
{
get_weaponname( i, wname, 31 )
// format( wname, 31, "weapon_%s", wname )
RegisterHam( Ham_Weapon_PrimaryAttack, wname, "HamPrimaryAttackPre", 0 )
}
}
}
Wasn't sure as to how get_weaponname() formats the return string. Let me know if it doesn't include weapon_, in which case you'd just have to uncomment that line with formatex().
__________________