VagosClubTM
Active Member
hello friends, I am trying to use this talkaction to be able to grant skins to other users, they are custom skins added to the outfit.xml but it does not grant them, it is version 772 TFS 1.4 I will leave the script here, when I use the command it tells me that it is I give myself the skin but at the time of checking I have nothing from now, thank you very much to those who take the time.
Lua:
local femaleOutfits = {
["Itachi"] = {167,},
["Itachi"] = {167,},
}
local maleOutfits = {
["Itachi"] = {167,},
["Itachi"] = {167,},
}
function onSay(cid, words, param)
local outfitName = string.lower(param)
if string.len(outfitName) == 0 then
return doPlayerSendCancel(cid, "NECESITAS PONER EL NOMBRE DEL ADDON.")
end
local dollCount = getPlayerItemCount(cid, 2108)
if dollCount == 0 then
return doPlayerSendCancel(cid, "NECESITAS EL ITEM ADDON DOLL.")
end
local outfitList = getPlayerSex(cid) == 0 and femaleOutfits or maleOutfits
local outfitId = outfitList[outfitName]
if not outfitId then
return doPlayerSendCancel(cid, "EL NOMBRE DE ESTE OUTFIT NO EXISTE.")
end
if canPlayerWearOutfit(cid, outfitId[0], 0) then
return doPlayerSendCancel(cid, string.format("Tu ya tienes este outfit.", outfitName))
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
doPlayerRemoveItem(cid, 2108, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string.format("tu ya obtuviste esta outfit completo.", outfitName))
doPlayerAddOutfit(cid, outfitId[0], 0)
return true
end