Code:
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "crystalMines")
local creaturename = getCreatureName(cid)
if creaturename == 'Undead Crystal Miner' then
doCreatureSay(cid, "asdasd", TALKTYPE_ORANGE_1)
end
end
<script>
<event name="crystalMines" />
</script> --thats in monster file
<event type="death" name="crystalMines" script="crystalMines.lua"/> --creaturescripts.xml
this shutsdown my server with error: Segmentation fault in console