topos = {x=100, y=100, z=7}, -- Bottom Right Corner
exit = {x=100, y=100, z=7} -- Exit
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if isInArea(getCreaturePosition(cid), arena.frompos, arena.topos) then
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid), TRUE)
doTeleportThing(cid, arena.exit)
doSendMagicEffect(arena.exit, 10)
doPlayerSendTextMessage(mostDamageKiller,MESSAGE_STATUS_CONSOLE_ORANGE,'[ARENA] You have defeated '..getCreatureName(cid)..'!')
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,'[ARENA] You where defeated by '..getCreatureName(mostDamageKiller)..'!')
end
return true
end
end
How can I modify it to when a player dies appear at temple with 0 mana
i got it working perfectly but i want that when a player dies there the player get 0 mana