local t = {
-- 0 = female, 1 = male
outfitIDs = {
[0] = 336,
[1] = 335
},
addonIDs = { -- how many addons should players get
[0] = 3,
[1] = 3
},
remove = true
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local sex = getPlayerSex(cid)
if not canPlayerWearOutfit(cid, t.outfitIDs[sex], t.addonIDs[sex]) then
doPlayerAddOutfit(cid, t.outfitIDs[sex], t.addonIDs[sex])
doCreatureSay(cid, 'Text', TALKTYPE_ORANGE_1)
if t.remove then
doRemoveItem(item.uid)
end
else
doCreatureSay(cid, 'You already have this addon!', TALKTYPE_ORANGE_1, false, cid)
end
return true
end