View Single Post
chu1720
Senior Member
Join Date: Mar 2010
Location: Hong Kong
Old 07-23-2010 , 05:23   Re: How to modified the damage type of a gun?
Reply With Quote #6

Quote:
Originally Posted by honorcode23 View Post
Not possible, when the "player_hurt" event is fired, the victim has already been damaged. Try healing the victim and attacking it again?

Try hooking it before it happens (EventHookMode_Pre) and see if you can block the damage. But im pretty sure isn't possible.

Also, if you don't want 2 hist at the same time, try doing this:

Code:
new client = GetClientOfUserId(GetClientInt(event, "userid"));
new damage = GetEventInt(event, "damage_health");
new prevhealth = GetClientHealth(client) + damage;

//Additional damage
new total = prevhealth -(damage*multiplier);
SetEntityHealth(client, total);
But then the additinal damage is not casued by, other plugins that make use of the damage will be not accurate. And it may happen that the victim is not killed by me.
chu1720 is offline
Send a message via MSN to chu1720