Mera Mero
Guess Who?
- Joined
- Dec 27, 2014
- Messages
- 417
- Reaction score
- 86
Hello otlanders i've got problem with my addon statue by action id i tried to add more items for it to get the addon but when i tried it only one item from these items which i added to it removed and obtain the outfit may you help me please? i need to make more items to obtain the outfit not only 1 item
Code:
local t = {
--[ACTIONID] = {FEMALEID, MALEID, "OUTFITNAME"}
[8001] = {136, 128, "citizen"}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[item.actionid]
local k = getPlayerSex(cid) == 0 and v[1] or v[2]
local msg = {"You\'ve already obtained the "..v[3].." addons!", "You don't have any Bufary coins.", "Congratulations, you\'ve obtained the "..v[3].." addons!"}
if canPlayerWearOutfit(cid, k, 3) then
return doPlayerSendCancel(cid, msg[1]), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF), false
end
[LIST]
[*] if getPlayerItemCount(cid, 9970) < 15 and getPlayerItemCount(cid, 9971) < 30 then
[*] return doPlayerSendCancel(cid, msg[2]), doSendMagicEffect(getThingPos(cid), CONST_ME_POFF), false
[*] end
[*] doPlayerAddOutfit(cid, k, 3)
[*] doPlayerRemoveItem(cid, 9970, 15)
[*] doPlayerRemoveItem(cid, 9971, 30)
[/LIST]
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[3])
return true
end