function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerItemCount(cid,5909) == 100 then
if item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
elseif item.itemid == 1945 then
doTransformItem(item.uid,item.itemid+1)
end
if getPlayerSex(cid) == 1 then
doPlayerAddOutfit(cid, 128, 1)
doPlayerAddOutfit(cid, 128, 2)
doPlayerRemoveItem(cid, 5909, 100)
else
doPlayerAddOutfit(cid, 136, 1)
doPlayerAddOutfit(cid, 136, 2)
doPlayerRemoveItem(cid, 5909, 100)
end
if item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
end
else
doPlayerSendCancel(cid, "You need 100 white cloths.")
end
return TRUE
end
How do I know which addon is what? xD
And could you post without any items? Just that you have to click on the item to get the addon xd
doPlayerAddOutfit(cid, 128, 1)
doPlayerAddOutfit(cid, 128, 2)
if getPlayerItemCount(cid,5909) == 100 then
if getPlayerItemCount(cid,2160) == 1 then
doPlayerRemoveItem(cid, 5909, 100)
doPlayerRemoveItem(cid, 2160, 1)
doPlayerSendCancel(cid, "You need 100 white cloths.")
doPlayerSendCancel(cid, "This set of addons costs 10k.")
if getPlayerItemCount(cid,5909) == 100 then
The item code:
Code:
if getPlayerItemCount(cid,5909) == 100 then
(cid,5909) is the item change it to the item id for the item you want them to pay to get it. and == 100 is how many.
doPlayerAddOutfit(cid, 128, 1)
doPlayerAddOutfit(cid, 128, 2)
doPlayerAddOutfit(cid, 128, 3)
function onUse(cid, item, fromPosition, itemEx, toPosition)
--------------Config
local idaction = 1700 ---- ActionID for the statue or tree.
local oufittypemale = 132 ---- Looktype of the outfit(male).
local oufittypefemale = 140 ---- Looktype of the outfit(female).
local addon = 1 ---------- 1 first addon, 2 second addon, 3 both addon
--------------End config.
if getPlayerPremiumDays(cid) >= 1 then
if item.actionid == idaction then
doPlayerAddOutfit(cid, outfittypemale, addon)
doPlayerAddOutfit(cid, outfittypefemale, addon)
doSendMagicEffect(fromPosition, 19)
end
else
doPlayerSendCancel(cid, "You need premium account.")
end
return TRUE
end
:thumbup:@grehy
Why:
It works just using:LUA:doPlayerAddOutfit(cid, 128, 1) doPlayerAddOutfit(cid, 128, 2)
LUA:doPlayerAddOutfit(cid, 128, 3)