1. How can I cancel damage or return it as 0 in Lua using OnEntityTakeDamage?

    I believe it's possible in C# this way:
    Code:
    info.damageTypes = new DamageTypeList();
                info.HitMaterial = 0;
                info.PointStart = Vector3.zero;
     
  2. Wulf

    Wulf Community Admin

    From the Docs:
    • Returning a non-null value overrides default server behavior (useful for godmode etc.)
    So just "return true" or anything other than null.
     
  3. Thanks!
    [DOUBLEPOST=1444953760][/DOUBLEPOST]
    • It should be okay to set the damage to 0, but if you don’t return non-null, the player’s client will receive a damage indicator (if entity is a BasePlayer)
    Do you know what to return to not make it display any visual indicators of damage?

    I can currently fall from far up which doesn't damage me, but it shows that I am bleeding.

    I currently return true
    [DOUBLEPOST=1444955016][/DOUBLEPOST]
    Never mind, I found an alternative.

    Thanks for your help.
     
    Last edited by a moderator: Oct 16, 2015