🏅EXPORTS / EVENT

Export and Event Explanations

Opens the full character creator interface for player customization.

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

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

TriggerEvent('LGFCharCreator:openCharacterCreator')

Open Only Clothing Page

Opens the clothing customization page within the character creator.

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

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

TriggerEvent('LGFCharCreator:openClothingCreator')

Get Player Skin and Set Player Skin

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

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

Sets the player's skin and appearance.

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

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

-- 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:

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

Last updated