nice, but where do i put it and what do i write in .xml file, please a tut maybe
Alright a tutorial.. here you go
There are two creature scripts that have to do with players dying, you have function "function onDeath(cid, corpse, deathList)" & "function onPrepareDeath(cid, deathList)", if you use onDeath cid won't exist anymore since he is dead, and if you use onPrepareDeath cid will exist because its preparing for death.
Next, you want to send an effect for when you die, so you need to use the function doSendMagicEffect(pos, effect), so you'll need to know the position of the player, you'll use getCreaturePosition(cid) to get his location, and then you can use an effect aswell such as CONST_ME_DEATHAREA, CONST_ME_MAGIC_RED, etc..
Next if you want you can add animated text to say 'Owned!' above the head, so you'll need to use doSendAnimatedText(pos, text, color), once again you'll get the creatures position with getCreaturePosition, pick a text and put it inside a quotation mark, like this " ", and lastly you pick a color, something like COLOR_GREEN, COLOR_PINK, COLOR_TEAL.. etc
Now you can pick to return true or false, true = player dies, and false = player never dies, so its pretty obvious here what you need
and then you end the script.. it's simple