how i can make by lua in this system ..make it by lua
change all moditifcations to lua, make all system by lua... how this system works? i may help you to make in luahow i can make by lua in this system ..
its reviv system i mad it in source 100% in source ??
how i can check if the damage from monster or player more than player target in lua?change all moditifcations to lua, make all system by lua... how this system works? i may help you to make in lua
what it means?how i can check if the damage from monster or player more than player target in lua?
in onPrepareDeath
I do not know why you want to do for sources, it's much more complicated.how i can check the damage from monster or player will hit target player more than hp he have ( sorry for my bad english)
in source
Player->getHealth() <= damage
i need to make somthing like this in luaI do not know why you want to do for sources, it's much more complicated.
on lua make using onPrepareDeath
if the lua function already exists, you have no reason to want to do it through sources
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and value > getCreatureHealth(cid) and getCreatureStorage(cid, 170265) == 1 and not exhaustion.check(cid, 74587) then
exhaustion.set(cid, 74587, 6)
doPlayerSendTextMessage(cid,21, "You will be revived in 5 seconds")
doCreatureAddMana(cid, getCreatureMaxMana(cid), true)
for x = 5, 1, -1 do
addEvent(doSendAnimatedText, x * 1000, getCreaturePosition(cid), tostring(x), TEXTCOLOR_TEAL)
end
return false
end
return true
end
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) and (type == STATSCHANGE_HEALTHLOSS) and getCreatureHealth(cid) <= value and getCreatureStorage(cid, 170265) >= 1 and not exhaustion.check(cid, 74587) then
exhaustion.set(cid, 74587, 6)
doCreatureAddMana(cid, getCreatureMaxMana(cid), true)
for x = 5, 1, -1 do
addEvent(doSendAnimatedText, x * 1000, getCreaturePosition(cid), tostring(x), TEXTCOLOR_TEAL)
end
return false
end
return true
end