tiddpd
PHP Scripter
- Joined
- Apr 16, 2008
- Messages
- 331
- Reaction score
- 0
I have this script to remove a statue when the lever is pulled, then to appear again when its pulled again, put I can only pull the lever once, and it wont go back to make the statue reapear, whats wrong with this script?
function onUse(cid, item, frompos, item2, topos)
statuepos1 = {x=286, y=95, z=10, stackpos=1}
statue1 = getThingfromPos(statuepos1)
if item.itemid == 1945 and item.uid == 6541 then
doRemoveItem(statue1.uid,4444)
doTransformItem(item.uid,1946)
doPlayerSendTextMessage(cid,22,"Something has just magically disapeared.")
elseif(item.itemid == 1946 and item.uid == 6541) then
doCreateItem(statue1.uid,4444)
doTransformItem(item.uid,1945)
doPlayerSendTextMessage(cid,22,"Something just magically appeared.")
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
end
function onUse(cid, item, frompos, item2, topos)
statuepos1 = {x=286, y=95, z=10, stackpos=1}
statue1 = getThingfromPos(statuepos1)
if item.itemid == 1945 and item.uid == 6541 then
doRemoveItem(statue1.uid,4444)
doTransformItem(item.uid,1946)
doPlayerSendTextMessage(cid,22,"Something has just magically disapeared.")
elseif(item.itemid == 1946 and item.uid == 6541) then
doCreateItem(statue1.uid,4444)
doTransformItem(item.uid,1945)
doPlayerSendTextMessage(cid,22,"Something just magically appeared.")
else
doPlayerSendTextMessage(cid,22,"Sorry, not possible.")
end
end