⚙️Configuration

Comprehensive instructions on configuring files and utilizing export functions.

Prior experience as a developer or basic programming skills are recommended to effectively navigate this section of the documentation.

1. Blacklist / Whitelist

-- Example of our blacklist/whitelist system.
-- This is just an example. You can customize the system for male or female and for each menu separately.

local crm_blacklist = {
    ['crm-charcreator'] = {},
}

crm_blacklist['crm-charcreator'] = {
    -- Blacklist/Whitelist for male.
    ['crm-male'] = {
        ['crm-peds'] = {}, -- Peds
        ['crm-hair'] = {}, -- Hair
        ['crm-facial'] = {}, -- Facial Hair
        ['crm-chest'] = {}, -- Chest Hair
        ['crm-eyebrows'] = {}, -- Eyebrows
        ['crm-makeup'] = {}, -- Makeup
        ['crm-blush'] = {}, -- Blush
        ['crm-lipstick'] = {}, -- Lipstick
        ['crm-clothing-0'] = {}, -- Heads
        ['crm-clothing-1'] = {}, -- Masks
        ['crm-clothing-3'] = {}, -- Hands
        ['crm-clothing-4'] = {}, -- Legs
        ['crm-clothing-5'] = {}, -- Bags and Parachutes
        ['crm-clothing-6'] = {}, -- Shoes
        ['crm-clothing-7'] = {}, -- Accessories
        ['crm-clothing-8'] = {}, -- Undershirts
        ['crm-clothing-9'] = {}, -- Body Armors
        ['crm-clothing-10'] = {}, -- Decals
        ['crm-clothing-11'] = {}, -- Tops/Torsos
        ['crm-accessories-0'] = {}, -- Hats
        ['crm-accessories-1'] = {}, -- Glasses
        ['crm-accessories-2'] = {}, -- Ears
        ['crm-accessories-6'] = {}, -- Watches
        ['crm-accessories-7'] = {}, -- Bracelets
    },
    -- Blacklist/Whitelist for female.
    ['crm-female'] = {
        ['crm-peds'] = {}, -- Peds
        ['crm-hair'] = {}, -- Hair
        ['crm-facial'] = {}, -- Facial Hair
        ['crm-chest'] = {}, -- Chest Hair
        ['crm-eyebrows'] = {}, -- Eyebrows
        ['crm-makeup'] = {}, -- Makeup
        ['crm-blush'] = {}, -- Blush
        ['crm-lipstick'] = {}, -- Lipstick
        ['crm-clothing-0'] = {}, -- Heads
        ['crm-clothing-1'] = {}, -- Masks
        ['crm-clothing-3'] = {}, -- Hands
        ['crm-clothing-4'] = {}, -- Legs
        ['crm-clothing-5'] = {}, -- Bags and Parachutes
        ['crm-clothing-6'] = {}, -- Shoes
        ['crm-clothing-7'] = {}, -- Accessories
        ['crm-clothing-8'] = {}, -- Undershirts
        ['crm-clothing-9'] = {}, -- Body Armors
        ['crm-clothing-10'] = {}, -- Decals
        ['crm-clothing-11'] = {}, -- Tops/Torsos
        ['crm-accessories-0'] = {}, -- Hats
        ['crm-accessories-1'] = {}, -- Glasses
        ['crm-accessories-2'] = {}, -- Ears
        ['crm-accessories-6'] = {}, -- Watches
        ['crm-accessories-7'] = {}, -- Bracelets        
    },
}

2. Events

-- You can use this event to display the character creation menu for new character.
-- You can use 'crm-male' or 'crm-female'.

TriggerEvent('crm-appearance:init-new-character', 'crm-male', function() 
    -- execute something after play click save appearance button.
end) 

-- You can use this event to display the character outfits menu!
-- You can use in your apartment/housing script!
TriggerEvent('crm-appearance:show-outfits') 

-- You can use this event to display the character creator menu!
TriggerEvent("crm-appearance:show-creator-menu")

-- You can use this event to laod player skin!
TriggerEvent("crm-appearance:load-player-skin")

-- You can use this event to display the store clothing menu!
TriggerEvent("crm-appearance:show-clothing-menu")

-- You can use this event to display the barbershop menu!
TriggerEvent("crm-appearance:show-barber-menu")

-- You can use this event to display the plasticsurgery menu!
TriggerEvent("crm-appearance:show-plasticsurgery-menu")

-- You can use this event to display the job outfits menu!
TriggerEvent('crm-appearance:show-job-outfits', 'police') 

3. Multicharacter Export

-- You can use this export to set the ped appearance!
local crm_ped = your_ped -- change your_ped with your ped variable name.
local crm_skin = json.decode(your_skin_table) -- change your_skin_table with skin variable name.
exports['crm-appearance']:crm_set_ped_appearance(crm_ped, crm_skin)

4. All Exports

Export
Parameters
Return

crm_get_ped_model

ped [number]

ped_model [string]

crm_get_ped_inheritance

ped [number]

inheritance [table]

crm_get_ped_face

ped [number]

face [table]

crm_get_ped_skin

ped [number]

skin [table]

crm_get_ped_hair

ped [number]

hair [table]

crm_get_ped_makeup

ped [number]

makeup [table]

crm_get_ped_clothing

ped [number]

clothing [table]

crm_get_ped_accessories

ped [number]

accessories [table]

crm_get_ped_appearance

ped [number]

appearance[table]

crm_set_ped_model

model [string]

-

crm_set_ped_inheritance

ped [number]; data [table]

-

crm_set_ped_face

ped [number]; data [table]

-

crm_set_ped_skin

ped [number]; data [table]

-

crm_set_ped_hair

ped [number]; data [table]

-

crm_set_ped_makeup

ped [number]; data [table]

-

crm_set_ped_clothing

ped [number]; data [table]

-

crm_set_ped_accessories

ped [number]; data [table]

-

crm_set_ped_appearance

ped [number]; data [table]

-

crm_set_player_appearance

data [table]

-

crm_init_player_appearance

gender [string] ("crm-male" or "crm-female")

-

Last updated