function onCreated() { if (playerdead) // yada yaa }
Would assume the player is dead when the NPC is created. Even in GS1, there is the if (playerdies) event for something like this. Other than what's already been repeated... I can't really see what else there is to add.
I suggest studying up on clientside/serverside as well as what are events, booleans and so on.