API

Client side

Before shop opens

AddEventHandler('rcore_clothing:onClothingShopOpened', function()
    -- do something before shop opens
end)

After shop closes

AddEventHandler('rcore_clothing:onClothingShopClosed', function()
    -- do something after shop closes
end)

Called when player's skin is loaded (on spawn or after /reloadskin)

AddEventHandler('rcore_clothing:afterSkinLoaded', function()
    -- do something after skin is loaded    
end)

After character creator is finished

AddEventHandler('rcore_clothing:charcreator:done', function()
    -- do something after character creator is finished
end)

Before/after decorations clear

  • Should not be required, whenever clothing removes decorations, it keeps non-clothing related ones

Reapply clothing decorations

TriggerEvent('rcore_clothing:reapplyDecorations')

Reload player skin

TriggerServerEvent('rcore_clothing:reloadSkin')

Save current skin

TriggerEvent('rcore_clothing:saveCurrentSkin')

Open changing room

Shows player's purchased clothes and saved outfits.

TriggerEvent('rcore_clothing:openChangingRoom')

Open clothing with everything available, for free

For admins primarily.

TriggerEvent('rcore_clothing:openClothingShopWithEverythingAndFree')

After purchasing an item

AddEventHandler('rcore_clothing:onItemPurchase', function(componentId, drawableId, textureId, label)
    print('Purchased item: ' .. componentId .. ' ' .. drawableId .. ' ' .. textureId .. ' ' .. label)
end)

Open clothing shop

Opens a clothing shop for the player.

  • shopType - required, type of the shop, you can open shops defined in config, like binco, or write any other type

  • shopConfig - optional, table with shop configuration, see Shop configs documentation

-- RegisterNetEvent('rcore_clothing:openShop', function(shopType, shopConfig)
TriggerEvent('rcore_clothing:openShop', shopType, shopConfig)

Exports

Get skin by identifier

local skin = exports["rcore_clothing"]:getSkinByIdentifier(identifier)

Get current player skin

  • includeCharacter - if true, returns character data as well (face, hair, etc.), if false, returns only clothing data

local skin = exports['rcore_clothing']:getPlayerSkin(includeCharacter)

Set player skin

  • forceReload - if true, players ped will be reloaded (respawned)

exports['rcore_clothing']:setPlayerSkin(skin, forceReload)

Set ped skin

export['rcore_clothing']:setPedSkin(ped, skin)

Server side

Exports

Get skin by identifier

local skin = exports["rcore_clothing"]:getSkinByIdentifier(identifier)

Last updated