Action Remove 2 walls with lever

Erikas Kontenis

Well-Known Member
Joined
Jul 3, 2009
Messages
1,444
Best answers
0
Reaction score
76
Location
Lithuania
Hello Its My First Hard Created Script I Hope I Helped For Somebody :p

Lua:
function onUse(cid, item, frompos, item2, topos)
	wall1 = {x=1496, y=1488, z=5, stackpos=1}
	wall2 = {x=1497, y=1488, z=5, stackpos=1}
	getwall1 = getThingfromPos(wall1)
	getwall2 = getThingfromPos(wall2)

	if item.uid == 7002 and item.itemid == 1945 then
		doRemoveItem(getwall1.uid,1)
		doRemoveItem(getwall2.uid,1)
		doTransformItem(item.uid,item.itemid+1)
	elseif item.uid == 7002 and item.itemid == 1946 then
		doCreateItem(1052,1,wall1)
		doCreateItem(1052,1,wall2)
		doTransformItem(item.uid,item.itemid-1)		
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	end

	return 1
end
If i helped for u please rep ++ me :)

P.s. Im Just Learning Lua :)
 

wiccan

New Member
Joined
Oct 11, 2009
Messages
26
Best answers
0
Reaction score
0
remove from script.

doTransformItem(item.uid,item.itemid+1) -- not necessary
doTransformItem(item.uid,item.itemid-1) -- not necessary
return 1 -- remove
 
Top