1. Hi! how to add a condition if the player asleep?
    Code:
    void OnEntityDeath(BaseEntity entity, HitInfo hitinfo)
        {
                if (entity is BasePlayer)
                {
                    BasePlayer victim = (BasePlayer)entity;                     if(hitinfo.Initiator != null && (hitinfo.Initiator is BasePlayer))
                        {
                            BasePlayer attacker = (BasePlayer)hitinfo.Initiator;
                            PrintToChat( string.Format("{0} killed {1}",attacker.displayName,victim.displayName) );
                        }
                }
        }
     
  2. BasePlayer.IsSleeping() should do the trick.
    Code:
    void OnEntityDeath(BaseEntity entity, HitInfo hitinfo)
        {
                if (entity is BasePlayer)
                {
                    BasePlayer victim = (BasePlayer)entity;                     if(hitinfo.Initiator != null && (hitinfo.Initiator is BasePlayer))
                        {
                            BasePlayer attacker = (BasePlayer)hitinfo.Initiator;
                            if(victim.IsSleeping())
                                PrintToChat( string.Format("{0} killed {1} while he was sleeping. How weak!",attacker.displayName, victim.displayName) );
                            else
                                PrintToChat( string.Format("{0} killed {1}",attacker.displayName, victim.displayName) );
                        }
                }
        }
     
  3. Thanx! How else to add to the code range from which the conclusion was killed?