function onSay(cid, words, param)
local femaleOutfits = { ["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}, ["trainer"]={1465}, ["vinganca"]={1443} }
local maleOutfits = { ["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}, ["trainer"]={1465}, ["vinganca"]={1443} }
local msg = {"Digite !addon e o nome correto. Por exemplo: !addon um, dois ou tres", "Voce não possui 5 diamonds!", "Bad param!", "Você recebeu seu addons!"}
local param = string.lower(param)
if(getPlayerItemCount(cid, 2145) >= 5) then
if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then
doPlayerRemoveItem(cid, 2145, 5)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
if(getPlayerSex(cid) == 0)then
doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
else
doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
end
return TRUE
end






info
Grupo: Cavaleiro
Registrado: 24/10/13
Posts: 180
Reputação: +46
local femaleOutfits = { [["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}}, ["trainer"]={1465}, ["vinganca"]={1443} }
local maleOutfits = { ["broterhood"]={1470}, ["caveira"]={1189}, ["dracula"]={1191}}, ["trainer"]={1465}, ["vinganca"]={1443} }
local msg = {"Digite !addon e o nome correto. Por exemplo: !addon um, dois ou tres", "Voce não possui 5 diamonds!", "Bad param!", "Você recebeu seu addons!"}
local param = string.lower(param)
if(getPlayerItemCount(cid, 2145) >= 5) then
if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then
doPlayerRemoveItem(cid, 2145, 5)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4])
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS)
if(getPlayerSex(cid) == 0)then
doPlayerAddOutfit(cid, femaleOutfits[param][1], 3)
else
doPlayerAddOutfit(cid, maleOutfits[param][1], 3)
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1])
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2])
end
return TRUE
end
Editado Janeiro 17 por homersapiens