Raised This Month: $ Target: $400
 0% 

Checking for primary or secondary attack?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-25-2006 , 21:24  
Reply With Quote #2

entity_get_button(id,EV_INT_button)

And then check & IN_ATTACK

So you have:

Code:
if(entity_get_button(id,EV_INT_button) & IN_ATTACK) {      // code }

And do the same for IN_ATTACK2 for alt attack.

To restrict it, it involves a bit more work. You basically have to constantly run this, in something like client_PreThink:

Code:
entity_set_int(id,EV_INT_button,entity_get_int(id,EV_INT_button) & ~IN_ATTACK)

Or if that doesn't work, you can use:

Code:
entity_set_int(id,EV_INT,button,IN_CANCEL)
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 16:18.


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