View Single Post
turtsmcgurts
SourceMod Donor
Join Date: Jul 2011
Old 07-12-2015 , 16:18   Re: [SDKHooks] Remove damage without removing push force?
Reply With Quote #2

A hacky workaround I used to accomplish this was to simply add the damage amount to the victims health to negate the incoming damage. If I remember correctly though, OnTakeDamage doesn't report the correct damage all the time (perhaps because of random damage spread?). I might be confusing it with OnPlayerHurt, it was one of them.

PHP Code:
public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype){ 

    if(
victim == attacker){ 
        
SetEntityHealth(victimvictim_health damage);
    }     
    return 
Plugin_Continue


Last edited by turtsmcgurts; 07-12-2015 at 16:25.
turtsmcgurts is offline