Postado Agosto 18, 2016 8 anos Estou com um pequeno erro no comando "Leavehouse" Uso versão OTX Script leavehouse.lua function onSay(cid, words, param, channel) if(not checkExhausted(cid, 666, 10)) then return false end local house = getHouseFromPos(getCreaturePosition(cid)) if(not house) then doPlayerSendCancel(cid, "You are not inside a house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end local owner = getHouseInfo(house).owner if(owner ~= getPlayerGUID(cid) and (owner ~= getPlayerGuildId(cid) or getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER)) then doPlayerSendCancel(cid, "You are not the owner of this house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end setHouseOwner(house, 0) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) return false end
Postado Agosto 18, 2016 8 anos Solução @maleskinho Tente assim: Spoiler function onSay(cid, words, param, channel) local house = getHouseFromPos(getCreaturePosition(cid)) if(not house) then doPlayerSendCancel(cid, "You are not inside a house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end local owner = getHouseInfo(house).owner if(owner ~= getPlayerGUID(cid) and (owner ~= getPlayerGuildId(cid) or getPlayerGuildLevel(cid) ~= GUILDLEVEL_LEADER)) then doPlayerSendCancel(cid, "You are not the owner of this house.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return false end setHouseOwner(house, 0) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_BLUE) return false end Obs: Se lhe ajudei, de um REP+ :D
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.