tiddpd
PHP Scripter
- Joined
- Apr 16, 2008
- Messages
- 331
- Reaction score
- 0
For this script it wanted to make it for when the lever is pulled, a fire will ignite then remove. But it says the item cannot be found, im guessing because there is no delay between doCreateItem and doRemoveItem, so is there a function to put a slight delay between functions? ...this is the code:
function onUse(cid, item, frompos, item2, topos)
local statuePos = {x = 314, y = 97, z = 8, stackpos=1}
local statue = getThingfromPos(statuePos)
if item.itemid == 1945 then
doCreateItem(6289,1,statuePos)
doRemoveItem(statuePos.uid,1)
doTransformItem(item.uid,1946)
elseif item.itemid == 1946 then
doTransformItem(item.uid,1945)
end
end