View Single Post
Ricky
Senior Member
Join Date: Jul 2005
Old 09-29-2017 , 15:19   Re: Block lava / toxic damage (CS)
Reply With Quote #5

Quote:
Originally Posted by NiHiLaNTh View Post
I modified the code above. Also you can play with trigger_hurt's key values and set damage to 0.

Code:
public fw_TakeDamage(const victim, inflictor, const attacker, Float:damage, dmg_bits)
{
    if (!attacker)
         return HAM_IGNORED

    static class[32]
    pev(attacker, pev_classname, class, charsmax(class))
   
    if (equal(class, "trigger_hurt"))
         return HAM_SUPERCEDE

    return HAM_IGNORED;
}
Solved. Thank you!
Ricky is offline