• 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!

Action Lever

GOD Fito

Member
Joined
Oct 3, 2008
Messages
97
Solutions
1
Reaction score
9
Hello :D

someone can edit this for remove 2 items with different id's


Here
Lua:
if doPlayerRemoveItem(cid, 2157, 50) == TRUE then


Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid, 2157, 50) == TRUE then
  doPlayerAddItem(cid,2195,1)
  doSendMagicEffect(fromPosition,14)
  doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Thanks")
else
    doPlayerSendCancel(cid, "You don't have the item.")
end
return true
end


I try with
Lua:
if doPlayerRemoveItem(cid, 2157, 1) and doPlayerRemoveItem(cid, 2160, 1)  == TRUE then

But if you have only 1 item and no 2, The item deleted and not received anything
 
don't works :/ it has the same problem, if you have the first item and not the second, Item is deleted and you get nothing
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid, 2157, 50) == TRUE then
  doPlayerRemoveItem(cid, ITEM, COUNT)
  doPlayerAddItem(cid,2195,1)
  doSendMagicEffect(fromPosition,14)
  doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "Thanks")
else
    doPlayerSendCancel(cid, "You don't have the item.")
end
return true
end
 
Code:
if (getPlayerItemCount(cid, 2157) >= 1) and (getPlayerItemCount(cid, 2160) >= 1) then
doPlayerRemoveItem(cid, 2157, 1)
doPlayerRemoveItem(cid, 2160, 1)
 
Back
Top