Raised This Month: $ Target: $400
 0% 

Is there any function can hook the shoot event?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mwy5ym
Junior Member
Join Date: Aug 2008
Old 05-16-2009 , 07:09   Is there any function can hook the shoot event?
Reply With Quote #1

I need this kind of function, which likes the follow two functions.
forward client_damage(attacker,victim,damage,wpnindex ,hitplace,TA);
forward client_death(killer,victim,wpnindex,hitplace, TK);

I need to get the client id and weapon id when he is shooting, and do not care if this shoot will or not take any damages.

Last edited by mwy5ym; 05-16-2009 at 08:25.
mwy5ym is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-16-2009 , 07:16   Re: Is there any function can hook the shoot event?
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=54887
__________________
xPaw is offline
mwy5ym
Junior Member
Join Date: Aug 2008
Old 05-16-2009 , 08:06   Re: Is there any function can hook the shoot event?
Reply With Quote #3

Quote:
Originally Posted by xPaw View Post
I do not know how to use this.
Could you format it as the follows please.
forward client_shoot(attacker,wpnindex)
mwy5ym is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-16-2009 , 08:15   Re: Is there any function can hook the shoot event?
Reply With Quote #4

You have just to copy the code. Where it's written "Gun fired" you ut your code.

But what do you want to do exactly ?
Arkshine is offline
mwy5ym
Junior Member
Join Date: Aug 2008
Old 05-16-2009 , 08:26   Re: Is there any function can hook the shoot event?
Reply With Quote #5

Quote:
Originally Posted by arkshine View Post
You have just to copy the code. Where it's written "Gun fired" you ut your code.

But what do you want to do exactly ?
Then What's the client id and weapon id ??
mwy5ym is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-16-2009 , 08:52   Re: Is there any function can hook the shoot event?
Reply With Quote #6

Invoker is the player's id. Weapon id is not passed here but you could use get_user_weapon(). Again, what do you want to do exactly ? Maybe there is another way to do what you want.
Arkshine is offline
mwy5ym
Junior Member
Join Date: Aug 2008
Old 05-16-2009 , 23:19   Re: Is there any function can hook the shoot event?
Reply With Quote #7

And what's the meaning of "flags" and "eventid", what's the use of them?
I were just making a database for myself(do not use the amxmodx data), I need to know a lot of data,so include the total shoot of the client.
Thanks for your help.
mwy5ym 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 01:33.


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