Hi guys i need a little help,
how i can give to a player dead silence pro?
Someone suggest me give specialty_falldamage but this doesnt work!
specialty_falldamage is a script perk.
I suggest you check in OnPlayerDamaged for MOD MOD_FALLING and ClientNum/XUID and then set damage to 0.
public override void OnPlayerDamage(Entity player, Entity inflictor, Entity attacker, int damage, int dFlags, string mod, string weapon, Vector3 point, Vector3 dir, string hitLoc)
{
if (mod == "MOD_FALLING")
{
player.Call("iprintlnbold", "^2DAMAGE " + damage);
damage = 0;
}
}
What`s wrong?
InfinityScript does not have any return value, so you can not just set damage to 0 there.
Try this:
CSHARP Code
public override void OnPlayerDamage(Entity player, Entity inflictor, Entity attacker, int damage, int dFlags, string mod, string weapon, Vector3 point, Vector3 dir, string hitLoc)
{
if (mod == "MOD_FALLING")
{
player.Call("iprintlnbold", "^2DAMAGE " + damage);
player.Health += damage;
}
}
Oh you`re right it void, thank you for your help!