⚙️Configuration

Configuration guide of Multicharacter Script.


Multicharacter Script Configuration

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.

1. Debug Mode

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

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

2. Ped and Camera Coordinates

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

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)

3. Manual Shutdown

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

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

4. Character Slots

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

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

5. Starter Items

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

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 },
}

6. Prefix for ESX

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

cfg.prefixForESX = "char" -- ESX prefix

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

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' }
}

8. Admin Settings

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

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

9. Character Models

Specifies the default models used for male and female characters.

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

10. Default Clothing

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

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
    },
}

11. Localization

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

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'
    }
}

Last updated