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

Lua hasCondition tfs 1.x

andu

Sold 649 scripts, 25 maps and 9 events!
Joined
Aug 7, 2009
Messages
976
Solutions
17
Reaction score
369
GitHub
olrios
Twitch
jamagowy
hasCondition, addCondition, removeCondition worked very well in 0.3 and 0.4.
But I have trouble to make it works in 1.x

Code:
if cid:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) == true then
this part doesnt works. It cannot find when player is in fight.
any tips?
 
LUA:
function onThink(cid, interval)
    if cid:isPlayer() == true then
        local hp, mp = 0, 0
        if cid:getCondition(CONDITION_INFIGHT) == true then
            hp = config.inCombat.healthPercent
            mp = config.inCombat.manaPercent
        else
...

Script all the time thinks player is out of combat
 
Last edited:
Back
Top