> For the complete documentation index, see [llms.txt](https://corem.gitbook.io/corem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://corem.gitbook.io/corem/crm-appearance/events-and-exports.md).

# Events & Exports

{% hint style="danger" %}
Prior experience as a developer or basic programming skills are recommended to effectively navigate this section of the documentation.
{% endhint %}

### Events

```lua
-- 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) -- 
```

### Multicharacter Export

```lua
-- 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)
```

### 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") | -                    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://corem.gitbook.io/corem/crm-appearance/events-and-exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
