• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Need fix for this script

Riyan

New Member
Joined
Aug 14, 2010
Messages
28
Reaction score
0
Hi,
I have a script on my server, which should replace the weapon on an improved (with another id.)
The point is that weapon when you click on the "cross" (id. 2354) turned in another direction, but it does not. When you click on this cross the weapon disappears and shows the message "You do not have any items to upgrade." Could I ask someone to fix this script?
Thanks in advance.
Code:
function onUse(cid, item, frompos, item2, topos)

	if item.itemid == 2354 then 
   
        if doPlayerRemoveItem(cid,8931,1) == 1 then
           doPlayerAddItem(cid,8932,1)
	doPlayerRemoveItem(cid,2354,1)
	doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")

	elseif item.itemid == 2354 then 
   
        if doPlayerRemoveItem(cid,8925,1) == 1 then
           doPlayerAddItem(cid,7434,1)
	doPlayerRemoveItem(cid,2354,1)
	doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
	
	elseif item.itemid == 2354 then 
   
        if doPlayerRemoveItem(cid,7422,1) == 1 then
           doPlayerAddItem(cid,7429,1)
	doPlayerRemoveItem(cid,2354,1)
	doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")

	elseif item.itemid == 2354 then 
   
        if doPlayerRemoveItem(cid,8850,1) == 1 then
           doPlayerAddItem(cid,8851,1)
	doPlayerRemoveItem(cid,2354,1)
	doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")

	elseif item.itemid == 2354 then 

        if doPlayerRemoveItem(cid,8920,1) == 1 then
           doPlayerAddItem(cid,8922,1)
	doPlayerRemoveItem(cid,2354,1)
	doPlayerSendTextMessage(cid,21,"Your weapon has been upgraded!")
       else
           doPlayerSendCancel(cid, "You do not have any pro items to uprgade!")
       end
end
end
end
end
end
   
       return 1
   end
 

Similar threads

Back
Top