This script i create when player die add one heart and if is dead but doesnt work..
Lua:
function onDeath(cid, corpse, deathList)
if isPlayer(cid) and isPlayer(deathList[1]) then
if skull_check == 4 then
heart = doAddContainerItem(corpse.uid, 5943, 1)
doItemSetAttribute(heart,"name", "Heart of " .. getPlayerName(cid))
doItemSetAttribute(heart,"description","This is the heart of "..getPlayerName(cid).." killed at Level "..getPlayerLevel(cid).." by "..getPlayerName(deathList[1]).."I was at level "..getPlayerLevel(deathList[1]).."[NOT-JUSTIFIED].")
doPlayerSendTextMessage(deathList[1], MESSAGE_STATUS_CONSOLE_ORANGE, "You Killed " .. getCreatureName(cid) .. ".")
doSendMagicEffect(getPlayerPosition(deathList[1]), 12)
return true
end
end
end