I need a function that makes a player is teleported to the temple when he die without logout. And count frag and give a item to the killer.
I made one but doesn't add frags because the player never dies:
Thanks
I made one but doesn't add frags because the player never dies:
Code:
function onPrepareDeath(cid, deathList)
if isPlayer(cid) == true then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
doCreatureAddHealth(cid, (getCreatureMaxHealth(cid) - getCreatureHealth(cid)),1, 255, true)
doCreatureAddMana(cid, (getCreatureMaxMana(cid) - getCreatureMana(cid)))
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doRemoveConditions(cid)
return false
end
return true
end
Thanks