Loremaster7
New Member
- Joined
- Oct 16, 2017
- Messages
- 29
- Reaction score
- 4
I created a lever, and I need it to disappear after 3 seconds ...
My code 1 :
My code 2:
The 2 do not work.
Practically, what I need is the opposite of this:
Instead of removing the stone, and it coming back in 3 seconds, I wanted to create a stone, and disappear it after 3 seconds ...
My code 1 :
Lua:
function onUse(cid, item, frompos, item2, topos)
time = 3
lever = {x = 2892, y = 2687, z = 8, stackpos=1}
getlever = getThingfromPos(lever)
if item.uid == 60115 and item.itemid == 1945 then
doTransformItem(item.uid,item.itemid+1)
addEvent(doCreateItem, 1945, doRemoveItem, (time*1000), 1945, 1, lever)
elseif item.uid == 60115 and item.itemid == 1946 then
doRemoveItem(getlever.uid,1945)
doTransformItem(item.uid,item.itemid-1)
end
return true
end
My code 2:
Lua:
function onUse(cid, item, frompos, item2, topos)
time = 3
lever = {x = 2892, y = 2687, z = 8, stackpos=1}
getlever = getThingfromPos(lever)
if item.uid == 60115 and item.itemid == 1945 then
doTransformItem(item.uid,item.itemid+1)
doCreateItem(1945,1,lever)
addEvent(doRemoveItem, (time*1000), 1945, 1, lever)
elseif item.uid == 60115 and item.itemid == 1946 then
doRemoveItem(getlever.uid,1945)
doTransformItem(item.uid,item.itemid-1)
end
return true
end
The 2 do not work.
Practically, what I need is the opposite of this:
Instead of removing the stone, and it coming back in 3 seconds, I wanted to create a stone, and disappear it after 3 seconds ...
Last edited: