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'] = {
{crm_models = {"mp_f_freemode_01"}}, -- Blacklist "mp_f_freemode_01" for everyone.
{crm_models = {"a_m_y_business_01"}, crm_identifiers = {"WED33239"}}, -- Only show for player with Specific Identifier.
{crm_models = {"a_m_y_business_02"}, crm_jobs = { -- Only show for specific grades in specific jobs
{crm_job = "police", crm_grades = {3, 4}},
}},
{crm_models = {"a_m_y_business_02"}, crm_gangs = { -- Only show for specific grades in specific gangs
{crm_gang = "ballas", crm_grades = {1, 2}},
}},
}, -- 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'] = {
{crm_styles = {4}, crm_textures = {2, 3}},
{crm_styles = {2, 3}, crm_identifiers = {"WED332390"}},
{crm_styles = {6, 7, 8}, crm_jobs = {
{crm_job = "police", crm_grades = {3, 4}},
}},
{crm_styles = {6, 7, 8}, crm_gangs = {
{crm_gang = "ballas", crm_grades = {1, 2}},
}},
}, -- 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')
-- Export to save player appearance in database.
local crm_data = nil -- If crm_data is nil, script will get the ped appearance.
exports['crm-appearance']:crm_save_appearance(crm_data , function()
print('appearance save')
end) --
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)