local cfg = {
cost = 300,
id = 2157
}
local ids = {192, 26 ,200 ,77 ,198 ,62 ,60 ,120 ,15 } -- put there ids of your outfits
function onUse(cid, item, frompos, item2, topos)
if(getPlayerItemCount(cid, cfg.id) >= cfg.cost) then
doPlayerRemoveItem(cid, cfg.id, cfg.cost)
local outfit = {lookType = ids[math.random(#ids)]}
return doSetCreatureOutfit(cid, outfit)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven't got enough gold nuggets for this outfit.")
end
end
local cfg = {
cost = 300,
id = 2157
}
local ids = {192, 26 ,200 ,77 ,198 ,62 ,60 ,120 ,15 } -- put there ids of your outfits
function onUse(cid, item, frompos, item2, topos)
if(getPlayerItemCount(cid, cfg.id) >= cfg.cost) then
doPlayerRemoveItem(cid, cfg.id, cfg.cost)
local outfit = {lookType = ids[math.random(#ids)]}
return doCreatureChangeOutfit(cid, outfit)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven't got enough gold nuggets for this outfit.")
end
end
return doSetCreatureOutfit(cid, outfit)
return doCreatureChangeOutfit(cid, outfit)
nice the way you think that we will guess how your script looks like and which engine you are using, you are a very very very very very smart person![]()
thanks broand here you want
Code:local cfg = { cost = 300, id = 2157 } local ids = {192, 26 ,200 ,77 ,198 ,62 ,60 ,120 ,15 } -- put there ids of your outfits function onUse(cid, item, frompos, item2, topos) if(getPlayerItemCount(cid, cfg.id) >= cfg.cost) then doPlayerRemoveItem(cid, cfg.id, cfg.cost) local outfit = {lookType = ids[math.random(#ids)]} return doCreatureChangeOutfit(cid, outfit) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You haven't got enough gold nuggets for this outfit.") end end
just change
Code:return doSetCreatureOutfit(cid, outfit)
to
Code:return doCreatureChangeOutfit(cid, outfit)