nevix
Tunzodus.net
Someone can help, I got a problem with doremoveitem
my code, but ores removing not working would be nice if someone help me solve this problem
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