• 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!

C++ doSendAnimatedText in source

Elgenady

Veteran OT User
Joined
Aug 5, 2011
Messages
1,638
Solutions
35
Reaction score
351
how i can make something like this but in source
Code:
for x = 1, 5 do
        local n = 5 - x
            addEvent(doSendAnimatedText, x * 1000, getCreaturePosition(cid), n > 0 and tostring(n), TEXTCOLOR_TEAL)
        end

tfs 0.4
 
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
 
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 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
 
I 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
i need to make somthing like this in lua
Code:
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
 
solved
Code:
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
in lua :D
 
Back
Top