• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

onPrepareDeath - player survives the death

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?
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
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...
 
Back
Top