Is it possible to make a lever with u-id when you use a lever? okey this sounds a bit weird.... okey I put my script here and you will be avaible to understand what I mean
This is the script that will create that leaver by useing a lever....
and this is the lever that has been created
The problem is how do I do to set the u-id at the created lever?
If you don't understand my problem ask for a better explanation
This is the script that will create that leaver by useing a lever....
Code:
function onUse(cid, item, frompos, item2, topos)
tile1 = {x=513, y=364, z=7, stackpos=1} --change tilepos
tile2 = {x=513, y=365, z=7, stackpos=1} --change tilepos
tile3 = {x=513, y=365, z=7, stackpos=1} --change tilepos
tile4 = {x=513, y=366, z=7, stackpos=1} --change tilepos
tile5 = {x=513, y=367, z=7, stackpos=1} --change tilepos
tile6 = {x=514, y=367, z=7, stackpos=1} --change tilepos
tile6 = {x=515, y=367, z=7, stackpos=1} --change tilepos
tile8 = {x=516, y=367, z=7, stackpos=1} --change tilepos
tile9 = {x=516, y=368, z=7, stackpos=1} --change tilepos
tile10 = {x=516, y=369, z=7, stackpos=1} --change tilepos
tile11 = {x=517, y=369, z=7, stackpos=1} --change tilepos
tile12 = {x=514, y=369, z=7, stackpos=1} --change tilepos
gettile1 = getThingfromPos(tile1)
gettile2 = getThingfromPos(tile2)
gettile3 = getThingfromPos(tile3)
gettile4 = getThingfromPos(tile4)
gettile5 = getThingfromPos(tile5)
gettile6 = getThingfromPos(tile6)
gettile7 = getThingfromPos(tile7)
gettile8 = getThingfromPos(tile8)
gettile9 = getThingfromPos(tile9)
gettile10 = getThingfromPos(tile10)
gettile11 = getThingfromPos(tile11)
gettile12 = getThingfromPos(tile12)
if item.uid == 30003 and item.itemid == 1945 then
doRemoveItem(gettile1.uid,1)
doRemoveItem(gettile2.uid,1)
doRemoveItem(gettile3.uid,1)
doRemoveItem(gettile4.uid,1)
doRemoveItem(gettile5.uid,1)
doRemoveItem(gettile6.uid,1)
doRemoveItem(gettile7.uid,1)
doRemoveItem(gettile8.uid,1)
doRemoveItem(gettile9.uid,1)
doRemoveItem(gettile10.uid,1)
doRemoveItem(gettile11.uid,1)
doRemoveItem(gettile12.uid,1)
doCreateItem(8548,1,tile1) --change itemID
doCreateItem(8559,1,tile2) --change itemID
doCreateItem(8568,1,tile4) --change itemID
doCreateItem(8565,1,tile5) --change itemID
doCreateItem(8567,1,tile6) --change itemID
doCreateItem(8567,1,tile7) --change itemID
doCreateItem(8564,1,tile8) --change itemID
doCreateItem(8552,1,tile9) --change itemID
doCreateItem(8553,1,tile10) --change itemID
doCreateItem(8554,1,tile11) --change itemID
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 30003 and item.itemid == 1946 then
doCreateItem(8547,1,tile1)
doCreateItem(8555,1,tile2)
doCreateItem(8578,1,tile3)
doCreateItem(8574,1,tile4)
doCreateItem(8571,1,tile5)
doCreateItem(8573,1,tile6)
doCreateItem(8573,1,tile7)
doCreateItem(8570,1,tile8)
doCreateItem(8551,1,tile9)
doCreateItem(8549,1,tile10)
doCreateItem(8550,1,tile11)
doCreateItem(1945,1,tile12)
doRemoveItem(gettile1.uid,1)
doRemoveItem(gettile2.uid,1)
doRemoveItem(gettile3.uid,1)
doRemoveItem(gettile4.uid,1)
doRemoveItem(gettile5.uid,1)
doRemoveItem(gettile6.uid,1)
doRemoveItem(gettile7.uid,1)
doRemoveItem(gettile8.uid,1)
doRemoveItem(gettile9.uid,1)
doRemoveItem(gettile10.uid,1)
doRemoveItem(gettile11.uid,1)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
and this is the lever that has been created
Code:
function onUse(cid, item, frompos, item2, topos)
tile = {x=513, y=371, z=7, stackpos=1}
gettile = getThingfromPos(tile)
if item.uid == 30004 and item.itemid == 1945 then
doRemoveItem(gettile.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 30004 and item.itemid == 1946 then
doCreateItem(409,1,tile)
doRemoveItem(gettile.uid,1)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
The problem is how do I do to set the u-id at the created lever?
If you don't understand my problem ask for a better explanation