1. Is that possible to get how long player lived, before he died in this action event? if yes, then how?
     
  2. Wulf

    Wulf Community Admin

    You'd most likely need to create a timer and count from the time they spawned till the time they died, then store that somewhere if needed.
     
  3. Then again you get a msg about how long you lived when you die... Not sure if that timer is server or client side but I'd expect it to be server-side since it seems to remember time passed between logins. No idea where that info is, but I'm willing to bet it's somewhere out there.
     
  4. Wulf

    Wulf Community Admin

    Mmm, yeah, then it's probably stored somewhere already, a big of digging is in order.
     
  5. 1) Save timestamp_one on spawn
    2) Save timestamp_two on die
    3) Time lived: timestamp_two - timestamp_one;
    [DOUBLEPOST=1439569912][/DOUBLEPOST]Also u can get (PlayerLifeStory) lifeStory from player that have: secondsAlive, metersWalked, metersRun, secondsSleeping.
     
  6. BasePlayer.lifeStory.secondsAlive, but it is a private field, you will only be able to get it in a c# plugin via reflection...
     
  7. i have no idea what you are talking here, instead i just saved unixtime when player logged in(to file) and then i get unixtime when he died and check for how long he lived.
     
  8. Reflexion allows you to access private fields and method in classes, it's a .NET quirk... the process needs to run at elevated privileges for it to work though.. I assume it would be the case for most servers? not sure...