GarQet
Own3d!
- Joined
- Feb 10, 2009
- Messages
- 1,381
- Solutions
- 14
- Reaction score
- 81
How to do when player_1 is killed by other player_2 then player_1 will be teleport to temple?
Why this script not working properly? Player receive full mana and health, is teleported, message is sent to him but he dies after a split second.
Please help me...
LUA:
function onPrepareDeath(cid, deathList)
local storage = getPlayerStorageValue(cid, 11698)
if storage == 1 then
doTeleportThing(cid, getTownTemplePosition(6))
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
if(gl(cid) == p) then
doPlayerSendCancel(cid, "Przezyles.")
else
doPlayerSendCancel(cid, "You have survived.")
end
end
return true
end
Please help me...