When you register any hook on a non-player entity, such as a weapon with Ham_PrimaryAttack or Ham_Reload, you should always check if the associated entity is a player (1-maxplayers) and if there's a chance of some delay between actions, ie a grenade throw resulting in an explosion a few seconds later, you should also check if connected. In some cases an 'is player' check may not be needed but it's a cheap check for good measure.