RW FashionExports
Server
Server-side exports for reading and changing player wardrobes.
Wardrobes belong to the character, not the player — every export looks up the character source is currently playing. If the player isn't loaded, the export returns false (or an empty list).
ownsOutfit
exports.rw_fashion:ownsOutfit(source, outfitId)- source:
number— player server id. - outfitId:
string— catalog id.
Returns: boolean
if exports.rw_fashion:ownsOutfit(source, 'navy_two_piece') then
-- let them into the gala
endgetWardrobe
exports.rw_fashion:getWardrobe(source)- source:
number— player server id.
Returns: string[] — catalog ids of every outfit the character owns.
local owned = exports.rw_fashion:getWardrobe(source)
print(('%s owns %d outfits'):format(GetPlayerName(source), #owned))giveOutfit
Puts an outfit in the character's wardrobe for free. Unlike Give to a player in the editor, it isn't logged as a sale, so it doesn't show in the Sales tab, and the player isn't notified.
exports.rw_fashion:giveOutfit(source, outfitId)- source:
number— player server id. - outfitId:
string— catalog id.
Returns: boolean — false if the outfit doesn't exist or they already own it.
-- Battle pass reward
exports.rw_fashion:giveOutfit(source, 'season_one_jacket')takeOutfit
Removes an outfit from the character's wardrobe.
exports.rw_fashion:takeOutfit(source, outfitId)- source:
number— player server id. - outfitId:
string— catalog id.
Returns: boolean — false if they didn't own it.