local config = {
itemY = 2160, -- Id do item Y
message = 'A mensagem que ira aparecer quando usar o item X no item Y.',
storage = 412311
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
-- esse if o player só usa 1x e nunca mais
if getPlayerStorageValue(cid, config.storage) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você já usou esse item no item Y.")
return true
end
if (itemEx.itemid == config.itemY) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.message)
doRemoveItem(item.uid, 1)
-- storage de usar apenas 1x
setPlayerStorageValue(cid, config.storage, 1)
end
return true
end
ta na mão meu querido