Code:
function GameStore.processOutfitPurchase(player, offerSexIdTable, addon)
local looktype
local _addon = addon and addon or 0
if player:getSex() == PLAYERSEX_MALE then
looktype = offerSexIdTable.male
elseif player:getSex() == PLAYERSEX_FEMALE then
looktype = offerSexIdTable.female
end
if not looktype then
return error({code = 0, message = "This outfit seems not to suit your sex, we are sorry for that!"})
elseif (not player:hasOutfit(looktype, 0)) and (_addon == 1 or _addon == 2) then
return error({code = 0, message = "You must own the outfit before you can buy its addon."})
elseif player:hasOutfit(looktype, _addon) then
return error({code = 0, message = "You already own this outfit."})
else
if not (player:addOutfitAddon(looktype, _addon))
or (not player:hasOutfit(looktype, _addon))
then
error({ code = 0, message = "There has been an issue with your outfit purchase. Your purchase has been cancelled."})
end
end
end
currently when you buy an outfit he check the gender of the character what he would like is that it doesn't matter the sex every time he buys an outfit he wins both male and female