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

Drown.lua Dossnt deal Damge

dunnish

New Member
Joined
Jun 18, 2009
Messages
268
Solutions
1
Reaction score
2
Hello!

when im underwater the character dossn't drown.


here is my drwon.lua
Lua:
local condition = createConditionObject(CONDITION_DROWN)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -20)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 2000)

function onStepIn(cid, item, position, fromPosition)
    if(isPlayer(cid)) then
        doAddCondition(cid, condition)
    end

    return true
end

function onStepOut(cid, item, position, fromPosition)
    doRemoveCondition(cid, CONDITION_DROWN)
    return true
end
 
Back
Top