warera
New Member
- Joined
- Feb 21, 2012
- Messages
- 15
- Reaction score
- 0
hi
i'm looking for someone to edit my leavehouse script so when someone is using !leavehouse they should receive a warning text saying that all their items in the house will delete all the items and if they accept it they must say !leavehouse yes
thanks in advance
i'm looking for someone to edit my leavehouse script so when someone is using !leavehouse they should receive a warning text saying that all their items in the house will delete all the items and if they accept it they must say !leavehouse yes
LUA:
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
thanks in advance