Hello,
I was wondering if anyone could make me a script where I pull a lever and 2 walls disappear and reappear after a couple of seconds..
I'm using: cryingdamson 0.3.6 (8.60) V82
///SOLVED///
WORKING SCRIPT (By Limos & ArtOfWork):
yours,
I was wondering if anyone could make me a script where I pull a lever and 2 walls disappear and reappear after a couple of seconds..
I'm using: cryingdamson 0.3.6 (8.60) V82
///SOLVED///
WORKING SCRIPT (By Limos & ArtOfWork):
Code:
local positions = {
{x = 92, y = 118, z=7},
{x = 92, y = 119, z=7}
}
local wallid = 1546
local wall = {} -- should be a table
local time_ = 30
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,
Last edited: