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

Door bugg

ib0w

teamfiveporject
Joined
Apr 3, 2009
Messages
91
Reaction score
4
Location
Sweden/Ronneby
The door transform to a wall when u click on it while u stand on it, can anyone help to fix this pls

PHP:
local function doorEnter(cid, item, toPosition)
	doTransformItem(item.uid, item.itemid + 1)
	doTeleportThing(cid, toPosition)
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
	local doorStorage = 98 -- (Must be the same in npcs)
 
	if(getPlayerStorageValue(cid, doorStorage) > 0) then
		doorEnter(cid, item, toPosition)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can only enter this door if you've done Rangelongs task!")
		return true
	end
 
	return true
end
 
You're probably using the wrong door or the wrong otb.
Basically, the next id after the closed door is a wall.
 
I think that is this the same thing what hapend with the old tfs door system, because the action change the door id to +1 and return to the closed dor id when you pass the door, so if you stand in the opened door and clic again on the opened door, it will change again to +1, and each time that u clic on the dor it will change forever for +1.


Try to change the item.itemid + 1 for the open door id
doTransformItem(item.uid, item.itemid + 1)

ex: if the closed door id is 1213 change for 1214

doTransformItem(item.uid, 1214)
 
I think that is this the same thing what hapend with the old tfs door system, because the action change the door id to +1 and return to the closed dor id when you pass the door, so if you stand in the opened door and clic again on the opened door, it will change again to +1, and each time that u clic on the dor it will change forever for +1.


Try to change the item.itemid + 1 for the open door id
doTransformItem(item.uid, item.itemid + 1)

ex: if the closed door id is 1213 change for 1214

doTransformItem(item.uid, 1214)

thnx works perfect!
 
Back
Top