Hello, I am trying to prevent put the same item as character has already weared on this slot -> when player tries to put item there.
But it does not work, when item is put and I try on this slot wear the same item then both items are moved to backpack (generally the first one becasue the second is all the time there)
Thanks in advance
Code:
function onEquip(cid, item, slot)
local itemWeared = getPlayerSlotItem(cid, 1).itemid
if (itemWeared ~= item.itemid) then
return true
else
return false
end
end
Thanks in advance