1. Hello. Im trying to get when a player is killed and then reward the player who killed them. But I can't seem to get it working... I've tried to do it on the OnPlayerDie() hook but it also fires when the player is downed. I've also tried to get BasePlayer.IsDead() but it returns false even when the player is killed from the downed state. All I want to get is the Player who killed them and the distance they got killed from. I have tried to look at other plugins like death notes to see how they do it but can't seem to figure it out. Thanks in advance.
     
  2. Nvm got it woking
     
  3. Remember with OnPlayerDie() the hitinfo can sometimes be null depending on the scenario.
    [DOUBLEPOST=1500849215][/DOUBLEPOST]I'd recommend using OnEntityDeath()
     
  4. How did you get this working in the end? I have a script that also triggers when the player is downed as opposed to just 'on death'.

    Thanks.
     
  5. I did OnPlayerDie() then I just waited till the next tick so the info could get filled out.
    void OnPlayerDie(BasePlayer player, HitInfo hitInfo)
    {
    NextTick(() =>
    {
    // Your code then you can get the BaseEntity that shot them by doing hitInfo?.Initiator and then .ToPlayer() to get the BasePlayer and you can just do player.IsDead() to check if he is dead
    });
    }