m3ssy
New Member
- Joined
- Feb 19, 2009
- Messages
- 24
- Reaction score
- 0
I'm trying to make a lever which will open and close doors [adding actionID and uniqueID at the same time]
Take a look at my script
The problem is the lever works only 2 times and then its getting fucked up. Its creating opened doors without removing the closed ones :S
What can I do?
Take a look at my script
Code:
function onUse(cid, item, frompos, item2, topos)
local wallpos = {x=1053, y=995, z=7, stackpos=1}
local wall = getThingfromPos(wallpos)
if item.uid == 7002 and item.itemid == 1945 then
doRemoveItem(wall.uid,1)
doCreateItem(5734, 1, wallpos)
doPlayerSendTextMessage(cid,22,"Something has moved not too far away.")
elseif item.uid == 7002 and item.itemid == 1946 then
doRemoveItem(wall.uid,1)
doItemSetAttribute(doCreateItem(5732, 1, wallpos), "aid", 666)
doItemSetAttribute(doCreateItem(5732, 1, wallpos), "uid", 6666)
doPlayerSendTextMessage(cid,22,"Something has moved not too far away.")
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
What can I do?