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

Solved [ACTION]create sugar oat

samuelav3

Member
Joined
Aug 18, 2014
Messages
95
Reaction score
5
I need help creating this item
my problem is that the item be created only 1 item disappears and not 2 as it should

Code:
-- create sugar oat --
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if itemEx.itemid == 2694 then   
        doRemoveItem(item.uid, 1)
        doPlayerAddItem(cid, 13939,1)
        player:removeItem(5467, 1)
        end
    return true
end
:D
only sisappears 5467 and no 5467 and 2694
 
Last edited:
Remove itemEx.uid instead of item.uid.
Code:
Item(itemEx.uid):remove(1)

Btw is this the whole script? If you remove an item from a player, better check in the if statement if the player has the item. I also don't see player defined.
 
Back
Top