# EXPORTS / EVENT

### Export and Event Explanations

Opens the full character creator interface for player customization.

```lua
exports['LGF-Char-Creator']:openCharacterCreator()
```

Triggers the opening of the character creator via an event handler.

```lua
TriggerEvent('LGFCharCreator:openCharacterCreator')
```

## Open Only Clothing Page

Opens the clothing customization page within the character creator.

```lua
exports['LGF-Char-Creator']:openClothingCreator()
```

Triggers the opening of the clothing customization page via an event handler.

```lua
TriggerEvent('LGFCharCreator:openClothingCreator')
```

## Get Player Skin and Set Player Skin

Retrieves the current skin or appearance settings of the player's character.

```lua
exports['LGF-Char-Creator']:GetPlayerSkin()
```

Sets the player's skin and appearance.

```lua
exports['LGF-Char-Creator']:SetPlayerSkin()
```

Here's a simple example demonstrating how to retrieve and set a player's skin:

```lua
-- Retrieve the current player's skin
RegisterCommand('getskin', function()
    local playerSkin = exports['LGF-Char-Creator']:GetPlayerSkin()
    print("Current player skin: ", json.encode(playerSkin,{indent = true}))
end)
```

To set the player's skin directly from the database without additional parameters:

```lua
-- Retrive Directly the current player's skin saved in database
RegisterCommand('setskin', function()
    exports['LGF-Char-Creator']:SetPlayerSkin()
    print("Player skin has been set from the database")
end)
```
