1. NOP

    NOP Naked Wanderer

    Right....so I can get the Wounded message to appear with this code...but only if Im downed, and then suicide.

    Code (Text):
    void OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info)
            {
                if(entity != null) {

                    BasePlayer player = (BasePlayer) entity.ToPlayer();
                   
                    if (player != null)
                    {
                        if(player.IsWounded() || player.HasPlayerFlag(BasePlayer.PlayerFlags.Wounded))
                            Plugin.Puts("Wounded! ");
                    }
                }
            }
    Im trying to determine if player Is downed / on the ground screaming, and then beable to programatically pick them back up. Any suggestions?
     
  2. Mughisi

    Mughisi Grenade Master Community Mod Oxide Developer

    Normally when a player takes fatal damage the game checks if the player should die or go into the wounded state. This should allow you to intercept this with the CanBeWounded hook as mentioned before. With the hook you can chane normal behaviour by returning a value or continue normal behaviour by returning null.
     
    Wulf likes this.