Elgenady
Veteran OT User
- Joined
- Aug 5, 2011
- Messages
- 1,683
- Solutions
- 36
- Reaction score
- 388
im use tfs 0.4
i did this script but the problem is when player get hp 0 target player still attack him and items like donation boots can add hp so player never die how i can fix this
i use this storge "40902" for block damge but no work
i hope someone can help me and understand me
or some one gave me script for player will stay 5 second be4 get msg when die
i did this script but the problem is when player get hp 0 target player still attack him and items like donation boots can add hp so player never die how i can fix this
Code:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if getCreatureHealth(cid) <= 0 then
setPlayerStorageValue(cid, 40902)
doCreatureSetNoMove(cid, cid, true)
addEvent(doCreatureSetNoMove, 2000, cid, false)
doSetItemOutfit(cid, 3058, 5000)
for x = 1, 2 do
local n = 2 - x
addEvent(doSendAnimatedText, x * 1000, getCreaturePosition(cid), n > 0 and tostring(n), TEXTCOLOR_TEAL)
end
end
return false
end
i use this storge "40902" for block damge but no work
i hope someone can help me and understand me
or some one gave me script for player will stay 5 second be4 get msg when die