AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is there any function can hook the shoot event? (https://forums.alliedmods.net/showthread.php?t=92513)

mwy5ym 05-16-2009 07:09

Is there any function can hook the shoot event?
 
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.

xPaw 05-16-2009 07:16

Re: Is there any function can hook the shoot event?
 
http://forums.alliedmods.net/showthread.php?t=54887

mwy5ym 05-16-2009 08:06

Re: Is there any function can hook the shoot event?
 
Quote:

Originally Posted by xPaw (Post 828469)

I do not know how to use this.
Could you format it as the follows please.
forward client_shoot(attacker,wpnindex)

Arkshine 05-16-2009 08:15

Re: Is there any function can hook the shoot event?
 
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 ?

mwy5ym 05-16-2009 08:26

Re: Is there any function can hook the shoot event?
 
Quote:

Originally Posted by arkshine (Post 828491)
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 ??

Arkshine 05-16-2009 08:52

Re: Is there any function can hook the shoot event?
 
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.

mwy5ym 05-16-2009 23:19

Re: Is there any function can hook the shoot event?
 
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.


All times are GMT -4. The time now is 01:33.

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