1. Hi, I want players to only take damage above 500 radiation. So far I've got this:
    Code:
            void OnRunPlayerMetabolism(PlayerMetabolism metabolism)
            {
                BasePlayer player = (BasePlayer) metabolism.GetComponent("BasePlayer");            if (metabolism.radiation_poison.value < 500 && metabolism.radiation_poison.value > 1)
                {                player.health = player.health;
                }
            }
    The damage you take form radiation starts beforehand therefore player.health = player.health doesn't work seem to work. Anyone has any suggestions what could work instead of this line?

    I've also tried looking at OnEntityTakeDamage. Managed to check which if a player got damaged and tried to determine the damagetype but this doesn't seem to work either. The DamageType always seems to be "Generic". Perhaps anyone has a solution to this?

    Code:
            void OnEntityTakeDamage(BaseEntity entity, HitInfo info)
            {            if (entity.name == "player/player")
                {                foreach (DamageType dt in info.damageTypes.types)
                    {
                        if (dt == DamageType.RadiationExposure)
                        {
                            ConsoleSystem.Broadcast("chat.add", 0, "Radiation Damage");
                        }
                    }
                }
    [DOUBLEPOST=1433328694,1433167347][/DOUBLEPOST]Fixed it! Found http://oxidemod.org/plugins/realistic-fall-damage.855/ as example code. Works great!
    Code:
            void OnEntityTakeDamage(BaseEntity entity, HitInfo info)
            {
                BasePlayer player = entity.GetComponent<BasePlayer>();
                if (player == null)
                {
                    return;
                }
               
                if(info.damageTypes.Total() <= 0)
                {
                    return;
                }            DamageType majorDamagetype = info.damageTypes.GetMajorityDamageType();
                if (majorDamagetype == DamageType.Radiation)
                {
                    float newDamage;
                    if (player.metabolism.radiation_poison.value >= 40)
                    {
                        newDamage = 0.05f;
                    }
                    else
                    {
                        newDamage = 0;
                    }
                    info.damageTypes.Set(majorDamagetype, newDamage);
                }
            }
     
  2. Can you make standalone plugins for this ? :p
     
  3. Yea, you can. It's pretty easy actually!
     
  4. starting to looking for plugins ^^ will see that !