• 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 Return true/false

Fire Element

Member
Joined
Sep 10, 2010
Messages
193
Reaction score
22
Location
Brazil
This script:

Code:
function onDeath(cid, corpse, killer)
    registerCreatureEvent(cid, "onPrepareDeath")
    if isPlayer(cid) == true then
    if getPlayerBlessing(cid, 5) then
       doCreatureSetDropLoot(cid, false)
       doPlayerSetLossSkill(cid, false)
       [B]return true[/B]
    end
    end
    return true
end

It works just like this?

Code:
function onDeath(cid, corpse, killer)
    registerCreatureEvent(cid, "onPrepareDeath")
    if isPlayer(cid) == true then
    if getPlayerBlessing(cid, 5) then
       doCreatureSetDropLoot(cid, false)
       doPlayerSetLossSkill(cid, false)
    end
    end
    return true
end
 
Last edited:
it will work exactly the same, if you have anything below a if that you dont want to be executed if the if is correct you return to stop the script ;P
 
Back
Top