Hey, i again XD
I need a action with "Switch with time".
Example:
Player use the switch(ID1945) and remove the stone and the switch (1945 transform 1946) Ok...
Later of 1 minute(1minute for example) the switch enabled back to id 1945 and back the stone position(create stone again).
I using the code, but i dont know how add time for the switch,Look:
gatepos = Cordenate stone
1850 = uniqueid switch
1945 = switch ( not enabled )
1946 = switch ( enabled )
How i add time for the switch?
Thank all, i wait for a comment...
I need a action with "Switch with time".
Example:
Player use the switch(ID1945) and remove the stone and the switch (1945 transform 1946) Ok...
Later of 1 minute(1minute for example) the switch enabled back to id 1945 and back the stone position(create stone again).
I using the code, but i dont know how add time for the switch,Look:
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=1037, y=1089, z=9, stackpos=1}
getgate = getThingfromPos(gatepos)
if item.uid == 1850 and item.itemid == 1945 and getgate.itemid == 1309 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 1850 and item.itemid == 1946
and getgate.itemid == 0 then
doCreateItem(1309,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
gatepos = Cordenate stone
1850 = uniqueid switch
1945 = switch ( not enabled )
1946 = switch ( enabled )
How i add time for the switch?
Thank all, i wait for a comment...
Last edited: