API: Open clothes shop

Open clothe shop with event

Make sure you call this after rcore_clothes is properly started.

CreateThread(function()
    local section =
    {
        pos = GetEntityCoords(PlayerPedId()),
        label = '👞',
        help = 'Press ~INPUT_CONTEXT~ to open shop menu',
        components = {
            {
                label = 'Shoes',
                name = 'shoes_1',
                from = 1,
                to = 88,
                current = 1,
                price = 150,
                reset = {
                    'shoes_2'
                },
            },
            {
                label = 'Shoes color',
                name = 'shoes_2',
                from = 0,
                to = 20,
                current = 1,
                price = 50,
            }
        },
        cam = {
            offset = {
                x = -0.5,
                y = 1.0,
                z = -0.5
            },
            pointOffset = {
                x = 0,
                y = 0,
                z = -0.8
            },
            taskHeading = 354.66
        },
        size = 1.2, --Default 1
        renderDistance = 10.0,
    }

    TriggerEvent("rcore_clothes:openMenu", section, 1, 1, false, true)
    
    -- paid if true = player will need to pay for the clothes
    -- saving if true = player will be able to save the clothes to wardrobe
    
    --TriggerEvent("rcore_clothes:openMenu", section, sectionIndex, shopIndex, paid, saving)
end)

Last updated