door is not teleporting players to the right position ![Frown :( :(](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
my doorvip.lua
this is what happens if i try to go from bottom to top
Before i use it:
![upload_2015-1-24_13-33-16.png upload_2015-1-24_13-33-16.png](https://static3.otland.net/d/attachments/19/19924-1644b07d9a1209228dbfb866c49c0899.jpg)
After i use it:
![upload_2015-1-24_13-33-35.png upload_2015-1-24_13-33-35.png](https://static3.otland.net/d/attachments/19/19925-0a42415d7fbaead7962515a470abbfcd.jpg)
This is what happens if i try to go from top to bottom:
Before i use it:
![upload_2015-1-24_13-34-17.png upload_2015-1-24_13-34-17.png](https://static3.otland.net/d/attachments/19/19926-5cbf7455c181be7cbf43d8a3c6507e77.jpg)
After i use it:
![upload_2015-1-24_13-34-40.png upload_2015-1-24_13-34-40.png](https://static3.otland.net/d/attachments/19/19927-c1ff6ebb1aa29e59c6a88603f51cb5b4.jpg)
i dont get any errors in the distro :l please help me
my doorvip.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if (item.actionid == 5788 and getPlayerStorageValue(cid,13500) >= 1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Bem-vindo a area VIP!", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Bem-vindo a area VIP", TALKTYPE_ORANGE_1)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce nao possui Vip Access.")
return TRUE
end
return FALSE
end
Before i use it:
![upload_2015-1-24_13-33-16.png upload_2015-1-24_13-33-16.png](https://static3.otland.net/d/attachments/19/19924-1644b07d9a1209228dbfb866c49c0899.jpg)
After i use it:
![upload_2015-1-24_13-33-35.png upload_2015-1-24_13-33-35.png](https://static3.otland.net/d/attachments/19/19925-0a42415d7fbaead7962515a470abbfcd.jpg)
This is what happens if i try to go from top to bottom:
Before i use it:
![upload_2015-1-24_13-34-17.png upload_2015-1-24_13-34-17.png](https://static3.otland.net/d/attachments/19/19926-5cbf7455c181be7cbf43d8a3c6507e77.jpg)
After i use it:
![upload_2015-1-24_13-34-40.png upload_2015-1-24_13-34-40.png](https://static3.otland.net/d/attachments/19/19927-c1ff6ebb1aa29e59c6a88603f51cb5b4.jpg)
i dont get any errors in the distro :l please help me
Last edited: