Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement