• 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 Problem DoRemoveitem

nevix

Tunzodus.net
Joined
Mar 31, 2010
Messages
356
Reaction score
62
Location
Lithuanian
Someone can help, I got a problem with doremoveitem

Code:
function onModalWindow(cid, modalWindowId, buttonId, choiceId)
local player = Player(cid)
local ore = player:getItemCount(5880)

if buttonId == 1 then

    local Blacksmith = ModalWindow(3, 'You have:', "[Ore Req] Make your choice:")
   
Blacksmith:addChoice(202, "[2] - Dagger")
Blacksmith:addChoice(203, "[3] - Sword")
Blacksmith:addChoice(204, "[4] - Carlin Sword")
Blacksmith:addChoice(208, "[8] - Broadsword")

Blacksmith:addChoice(211, "[11] - Ratana")
Blacksmith:addChoice(215, "[15] - Two Handed Sword")
Blacksmith:addChoice(232, "[32] - Wyvern Fang")

    Blacksmith:addButton(9, 'Make')
    Blacksmith:addButton(2, 'Exit')

    Blacksmith:sendToPlayer(cid)
   
   
end

if buttonId == 9 then


if choiceId - 200  > ore then
doPlayerPopupFYI(cid, 'Not enought ores!')
elseif choiceId == 202 then
doPlayerPopupFYI(cid, 'You created a weapon!!!')
doPlayerAddItem(cid, 2379, 1)
doRemoveItem(5880.uid, 2)

else

doPlayerPopupFYI(cid, choiceId)

end

end

return true

end


my code, but ores removing not working would be nice if someone help me solve this problem
 
Back
Top