Hello,
Could anyone please make this script work for 0.2.15?
yours,
Could anyone please make this script work for 0.2.15?
Code:
local positions = {
{x=1498, y=863, z=5, stackpos=1},
}
local wallid = 1546
local wall = {} -- should be a table
local time_ = 10
local function doCreateWalls()
for x = 1, #positions do
doCreateItem(wallid, 1, positions[x])
wall[x] = nil -- delete the table
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if #wall < #positions then -- is the wall table empty
for x = 1, #positions do
wall[x] = getTileItemById(positions[x], wallid).uid
doRemoveItem(wall[x], 1)
end
addEvent(doCreateWalls, time_ * 1000)
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
return true
else
doPlayerSendCancel(cid, "The walls are already removed.")
return false
end
end
yours,