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

House Bug when Leave house!

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,348
Reaction score
76
Location
Germany
If a player buys a house on my Server he can't sell it with !leavehouse he needs to say "alana som" but when he is inside the house he stuck inside and don't get kicked out!

Also I want to make it work that if you say !leavehouse you can leave the house and not alana som.

Talkactions.xml
PHP:
	<!-- Houses -->
	<talkaction words="!buyhouse" filter="word-spaced" event="function" value="houseBuy"/>
	<talkaction words="!leavehouse" filter="word-spaced" event="function" value="houseSell"/>
	<talkaction words="alana sio" filter="word-spaced" event="function" value="houseKick"/>
	<talkaction words="aleta grav" filter="word-spaced" event="function" value="houseDoorList"/>
	<talkaction words="aleta sio" filter="word-spaced" event="function" value="houseGuestList"/>
	<talkaction words="aleta som" filter="word-spaced" event="function" value="houseSubOwnerList"/>
	<talkaction words="alana som" filter="word-spaced" event="script" value="leavehouse.lua"/>


leavehouse.lua

PHP:
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


Also the items keep stucking inside the house and alana sio doesn't work!

If you say !leavehouse it says A player with this name is not online
 
Code:
<talkaction words="[COLOR=#ff0000]!leavehouse[/COLOR]" filter="word-spaced" event="function" value="[COLOR=#0000ff]houseSell[/COLOR]"/>
<talkaction words="[COLOR=#0000ff]alana som[/COLOR]" filter="word-spaced" event="script" value="[COLOR=#ff0000]leavehouse.lua[/COLOR]"/>

You might wanna change that and which TFS version are you using?
 
Back
Top