You cannot block the secondary-attack animation though the actual workings of the secondary attack are blocked. Try it with the usp, you will see the silencer being applied but it really doesn't get put on once the animation completes.
This line sets primary attack bits in the buttons bit-field if you have the cvar enabled for force primary attack. If you are unfamiliar with bit operators, do a quick google search and you will find plenty of reading material.
PHP Code:
if ( get_pcvar_num( g_pForcePrimaryAttack ) )
iButtons |= IN_ATTACK;
This updates the actual buttons issued to the game with our modified buttons value. With this line we are removing the secondary attack bits to make it not occur (& ~IN_ATTACK2). If you have the force-primary cvar enabled, the primary attack bits were set in the iButtons bit-field [above] so this will take care of both blocking secondary-attack and issue a primary attack.
PHP Code:
set_uc( Handle , UC_Buttons , iButtons & ~IN_ATTACK2 );
Hope that helped.
__________________