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

Solved Script not working as it should

Bill3000

New Member
Joined
Jul 26, 2010
Messages
106
Reaction score
1
This script is not working as it should.
I need it to when the player is outsite of the door, he goes inside. And when se is inside, he goes outside.

And if he is not in front of the door, he receive a message.

Lua:
function onUse(cid, item, frompos, item2, topos)

local posdentro = {x=32293, y=32293, z=7}
local posfora = {x=32295, y=32293, z=7}


if (getCreaturePosition(cid) == posfora) then
		
doTeleportThing(cid, posdentro)
doSendMagicEffect(posdentro, 10)
else
doPlayerSendTextMessage(cid, 22, "You must be in front of the door.")

elseif (getCreaturePosition(cid) == posdentro) then
		
doTeleportThing(cid, posfora)
doSendMagicEffect(posfora, 10)
else
doPlayerSendTextMessage(cid, 22, "You must be in front of the door.")

end


return true

end

Any ideas? Thanks!

- - - Updated - - -

Solved by myself! Thanks!
 
Last edited:
Back
Top