---
description: Configuration guide of Multicharacter Script.
---

# Configuration

***

## <mark style="color:blue;">Multicharacter Script Configuration</mark>

This section provides a detailed explanation of the configuration options available for the **Multicharacter** script. You can customize these settings in the `cfg.lua` file to tailor the script to your server's needs.

### <mark style="color:green;">1. Debug Mode</mark>

Enables or disables debug mode. This is useful for testing purposes.

```lua
cfg.debug = false -- Set to true to enable debug mode
```

### <mark style="color:green;">2. Ped and Camera Coordinates</mark>

These settings define the initial position and orientation of the character ped and camera during character creation.

```lua
cfg.pedCoords = vec4(160.3552, -1071.0789, 29.4180, 176.0819)
cfg.pedCamCoords = vec4(157.3552, -1071.0789, 29.4180, 360.0)
cfg.cameraFov = 45.0 -- Field of View for the camera
cfg.firstSpawn = vec4(147.3672, -1094.5345, 29.8439, 358.2464)
```

### <mark style="color:green;">3. Manual Shutdown</mark>

If enabled, the script will require manual shutdown. This can be useful for preventing unexpected closures.

```lua
cfg.manualShutdown = true -- Set to true to enable manual shutdown
```

### <mark style="color:green;">4. Character Slots</mark>

Defines the default number of free character slots available to players and whether characters can be deleted.

```lua
cfg.defaultFreeSlotAmount = 1 -- Number of free character slots
cfg.canDeleteCharacter = true -- Allow players to delete characters
```

### <mark style="color:green;">5. Starter Items</mark>

Determines whether players receive starter items when creating a new character and what those items are.

```lua
cfg.giveStarterItems = true -- Give players starter items
cfg.starterItems = {
    { name = 'phone', amount = 1 },
    { name = 'id_card', amount = 1 },
    { name = 'driver_license', amount = 1 },
    { name = 'money', amount = 1000 },
    { name = 'burger', amount = 2 },
    { name = 'cola', amount = 2 },
}
```

### <mark style="color:green;">6. Prefix for ESX</mark>

Specifies the prefix used for ESX-related functionality. If you're not using ESX, you can leave this part untouched.

```lua
cfg.prefixForESX = "char" -- ESX prefix
```

### <mark style="color:green;">7. Social Media Links</mark>

Allows you to add social media links that players can access within the script. Icons for these links can be customized.

```lua
cfg.socialMedias = {
    { icon = 'FaInstagram', link = 'https://www.instagram.com/stg/' },
    { icon = 'FaYoutube', link = 'https://www.youtube.com/@stgStore' },
    { icon = 'FaDiscord', link = 'https://discord.gg/stg' }
}
```

### <mark style="color:green;">8. Admin Settings</mark>

Lists the admins who can create new codes for character slots and the command used to create these codes.

```lua
cfg.createCodeCommand = 'createCode' -- Command to create new codes
cfg.admins = {
    ['license:07c122ff7a5062360500154204bf46d8819d4a3e'] = true,
    ['license:ab9b8cd3eee69e54f1b7a6abe222b00ffe477f8c'] = true
}
```

### <mark style="color:green;">9. Character Models</mark>

Specifies the default models used for male and female characters.

```lua
cfg.models = {
    [0] = "mp_m_freemode_01", -- Male model
    [1] = "mp_f_freemode_01"  -- Female model
}
```

### <mark style="color:green;">10. Default Clothing</mark>

Defines the default clothing and appearance settings for new characters. Separate settings are provided for male (`"m"`) and female (`"f"`) characters.

```lua
cfg.defaultClothes = {
    ["m"] = {
        mom = 43,
        dad = 29,
        face_md_weight = 61,
        skin_md_weight = 27,
        -- Additional appearance settings
    },
    ["f"] = {
        mom = 28,
        dad = 6,
        face_md_weight = 63,
        skin_md_weight = 60,
        -- Additional appearance settings
    },
}
```

### <mark style="color:green;">11. Localization</mark>

Determines the language used for in-game text and messages. The script supports multiple languages, and you can add or customize language files.

```lua
cfg.locale = 'en' -- Default language
cfg.locales = {
    ['en'] = {
        playGame = 'PLAY GAME',
        photoMode = 'PHOTO MODE',
        redeemCode = 'REDEEM CODE',
        exitGame = 'EXIT GAME',
        createCharacter = 'Create Character',
        createNewCharacter = 'CREATE NEW CHARACTER',
        characterCreator = 'CHARACTER CREATOR',
        firstname = 'Firstname',
        lastname = 'Lastname',
        gender = 'Gender',
        dob = 'Date of Birth',
        nationality = 'Nationality',
        m = 'Male',
        f = 'Female',
        redeem = 'REDEEM',
        code = 'CODE',
        buyCharacter = 'Buy Character',
        this_code_used = "This code already used!",
        code_not_found = "Code is not found!",
        fillParts = "You should fill inputs!",
        exitMessage = 'Successfully exited the game'
    },
    ['de'] = {
        playGame = 'SPIELEN',
        photoMode = 'FOTOMODUS',
        redeemCode = 'CODE EINLÖSEN',
        exitGame = 'SPIEL VERLASSEN',
        createCharacter = 'Charakter erstellen',
        createNewCharacter = 'NEUEN CHARAKTER ERSTELLEN',
        characterCreator = 'CHARAKTER-EDITOR',
        firstname = 'Vorname',
        lastname = 'Nachname',
        gender = 'Geschlecht',
        dob = 'Geburtsdatum',
        nationality = 'Nationalität',
        m = 'Männlich',
        f = 'Weiblich',
        redeem = 'EINLÖSEN',
        code = 'CODE',
        buyCharacter = 'Charakter kaufen',
        this_code_used = "Dieser Code wurde bereits verwendet!",
        code_not_found = "Code wurde nicht gefunden!",
        fillParts = "Sie müssen die Felder ausfüllen!",
        exitMessage = 'Spiel erfolgreich beendet'
    },
    ['fr'] = {
        playGame = 'JOUER',
        photoMode = 'MODE PHOTO',
        redeemCode = 'UTILISER LE CODE',
        exitGame = 'QUITTER LE JEU',
        createCharacter = 'Créer un personnage',
        createNewCharacter = 'CRÉER UN NOUVEAU PERSONNAGE',
        characterCreator = 'CRÉATEUR DE PERSONNAGES',
        firstname = 'Prénom',
        lastname = 'Nom de famille',
        gender = 'Genre',
        dob = 'Date de naissance',
        nationality = 'Nationalité',
        m = 'Homme',
        f = 'Femme',
        redeem = 'UTILISER',
        code = 'CODE',
        buyCharacter = 'Acheter un personnage',
        this_code_used = "Ce code a déjà été utilisé !",
        code_not_found = "Code non trouvé !",
        fillParts = "Vous devez remplir les champs !",
        exitMessage = 'Jeu quitté avec succès'
    },
    ['sp'] = {
        playGame = 'JUGAR',
        photoMode = 'MODO FOTO',
        redeemCode = 'CANJEAR CÓDIGO',
        exitGame = 'SALIR DEL JUEGO',
        createCharacter = 'Crear personaje',
        createNewCharacter = 'CREAR NUEVO PERSONAJE',
        characterCreator = 'CREADOR DE PERSONAJES',
        firstname = 'Nombre',
        lastname = 'Apellido',
        gender = 'Género',
        dob = 'Fecha de nacimiento',
        nationality = 'Nacionalidad',
        m = 'Masculino',
        f = 'Femenino',
        redeem = 'CANJEAR',
        code = 'CÓDIGO',
        buyCharacter = 'Comprar personaje',
        this_code_used = "¡Este código ya fue usado!",
        code_not_found = "¡Código no encontrado!",
        fillParts = "¡Debe completar los campos!",
        exitMessage = 'Juego salido con éxito'
    }
}
```

***
