Raised This Month: $ Target: $400
 0% 

Check if he fired on PrimaryAttack post


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-30-2010 , 20:09   Re: Check if he fired on PrimaryAttack post
Reply With Quote #1

Quote:
bcoz the engine blocks the shotgun's attack when player is underwater
Because there is simply a check at the start of PrimaryAttack(), which check pev_waterlevel.

Quote:
best method of how know if the player fired
All is depending your need (if you need to hook as pre/pôst). As post, see the tutorial by VEN about catching shot event. The weapon event is call in PrimaryAttack() after the first checks. If you need to hook as pre, you would need to hook PrimaryAttack() and adding check with pev_waterlevel and m_iClip. It should be enough.
__________________

Last edited by Arkshine; 11-30-2010 at 20:15.
Arkshine is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-01-2010 , 17:35   Re: Check if he fired on PrimaryAttack post
Reply With Quote #2

Quote:
Originally Posted by Arkshine View Post
As post, see the tutorial by VEN about catching shot event. The weapon event is call in PrimaryAttack() after the first checks.
That's how you hook after player shoots.

Quote:
Originally Posted by Arkshine View Post
If you need to hook as pre, you would need to hook PrimaryAttack() and adding check with pev_waterlevel and m_iClip. It should be enough.
That's how you hook before player shoots.


Why did you not either read that or use that?
They both use Ham_PrimaryAttack.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 11:17.


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