Events & Exports
This section is aimed at developers. Basic scripting knowledge will help you get the most out of it.
Events
crm-appearance:init-new-character
Opens the character-creation menu for a new character. Pass 'crm-male' or 'crm-female', plus a callback that runs once the player saves.
TriggerEvent('crm-appearance:init-new-character', 'crm-male', function()
-- Runs after the player clicks the "save appearance" button.
end)crm-appearance:show-outfits
Opens the player’s saved-outfits menu — handy from an apartment or housing script.
TriggerEvent('crm-appearance:show-outfits')crm-appearance:show-creator-menu
Opens the full character-creator menu.
TriggerEvent('crm-appearance:show-creator-menu')crm-appearance:load-player-skin
Re-applies the player’s saved skin to their ped.
TriggerEvent('crm-appearance:load-player-skin')crm-appearance:show-clothing-menu
Opens the clothing-store menu.
TriggerEvent('crm-appearance:show-clothing-menu')crm-appearance:show-barber-menu
Opens the barbershop menu.
TriggerEvent('crm-appearance:show-barber-menu')crm-appearance:show-plasticsurgery-menu
Opens the plastic-surgery menu.
TriggerEvent('crm-appearance:show-plasticsurgery-menu')crm-appearance:show-job-outfits
Opens the job-outfits menu for the given job.
TriggerEvent('crm-appearance:show-job-outfits', 'police')Exports
crm_save_appearance
Saves a player’s appearance to the database. Pass nil as the data to save the ped’s current appearance.
local crm_data = nil -- nil = save the ped's current appearance
exports['crm-appearance']:crm_save_appearance(crm_data, function()
print('appearance saved')
end)crm_set_ped_appearance
Applies a saved skin to a ped — useful inside a multicharacter script.
local crm_ped = your_ped -- your ped variable
local crm_skin = json.decode(your_skin_table) -- your decoded skin data
exports['crm-appearance']:crm_set_ped_appearance(crm_ped, crm_skin)All Exports
| Export | Parameters | Returns |
|---|---|---|
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" | — |