1. I see sometimes OnPlayerDie is called when NPC dies. That's incorrect. Please, fix that.
     
  2. The NPC is classed as a player.
     
  3. But it's not a real player, so this is not logical for humans C:
    I think that it's stupid to call OnPLAYERDie when Scientist\.. dies. Add OnNPCDie if Wolf\.. want
     
  4. That'd mean 2 hook calls for the exact same behaviour which is incredibly inefficient.

    If you don't want the NPCs to trigger your hook call then add a simple if check above your code such as
    Code:
    If (player is NPCPlayerApex)
    {
            return;
    }
     
  5. Why must i use player is NPCPlayerApex? There is a player.IsNPC, can we use it?
     
  6. Ah is there? I don't have the files handy right now so I can't double check. But if there is that I assume you can use it for your needs, yeah.
     
  7. Okay, thanks. but i still think that OnPlayerDie shouldn't be called when an NPC dies.
     
  8. Well in Rust programming terms an NPC is a player. NPCs inherit the BasePlayer class. When a BasePlayer is killed, the hook is called.
     
  9. Sure, but i think that's not so cool :D
     
  10. Another solution is also checking against the userid.

    Code:
                if (player.userID < 70000000000) return;