Detect damage
How to detect a weapon with which was damage done ?
Like I've plugin that deals extra damage if you are with knife, but it hooks like if(AttackerWeapon == CSW_KNIFE) and there is a bug when I throw HE, and instantly switch my gun to knife, it deals KNIFE damage, even if it was done by HE. |
Re: Detect damage
Hook damage with ham and...
Just making sure you know, first you must make sure attacker is a player (1 <= attacker <= g_iMaxPlayers) In the ham called function you get the "inflictor" input, you can check that against "attacker", if they're equal, the attacker used a weapon, if it's not, the attacker used a nade or something else to attack. Then you can just get_user_weapon()... |
Re: Detect damage
Like this: ?
PHP Code:
|
Re: Detect damage
Simple, try it. :)
|
| All times are GMT -4. The time now is 23:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.