Raised This Month: $ Target: $400
 0% 

Need a hook on secondary fire shotgun


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-17-2009 , 21:41   Re: Need a hook on secondary fire shotgun
Reply With Quote #4

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_numg_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_ucHandle UC_Buttons iButtons & ~IN_ATTACK2 ); 
Hope that helped.
__________________
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode