I've been trying to edit and make a perfect addon system. Only thing I got so far is this
What this does is when you use a certain item, you get the addon. But I also want it to take some items. Like for this one 50 mino leathers and 100 chicken feathers. If anyone know how to fix this, please reply![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Thanks
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (getPlayerStorageValue(cid, 21201) == EMPTY_STORAGE) then
doCreatureSay(cid, "You've gained the citizen outfit.", TALKTYPE_ORANGE_1)
doPlayerAddOutfit(cid, 128, 3)
doPlayerAddOutfit(cid, 136, 3)
setPlayerStorageValue(cid, 21201, 1)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYDAMAGE)
else
doPlayerSendTextMessage(cid,22,"You already have this addon, or you do not have 100 chicken feathers.")
end
return true
end
What this does is when you use a certain item, you get the addon. But I also want it to take some items. Like for this one 50 mino leathers and 100 chicken feathers. If anyone know how to fix this, please reply
Thanks