> For the complete documentation index, see [llms.txt](https://mz-studio.gitbook.io/muziscripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mz-studio.gitbook.io/muziscripts.com/mz_chat/config.md).

# Config

```lua
Config = {}
Config.Framework = 'qb'    --esx | qb (include qbx)
Config.Language = 'en'     --edit it in Langague/[language].lua


Config.DetectInventoryUse = true    --show ‘/me itemLabel’ when use the item
                                    --auto detect qb | ox | qs | codem
                                    --if custom,edit it in client/inventory/ or server/inventory/ . 
                                    --just add lua by yourself | if you nedd help ,pls open ticket in discord


Config.TextTimeDisplay = false  --show timestamp in chat message
Config.ToggleChatStateKey = 'L' -- Default key to toggle chat state
-- Chat settings
Config.MaxMessages = 100
Config.FadeTimeout = 10000 -- Message fade timeout (ms)
Config.AnimationTime = 200 -- Animation time (ms)

-- Chat auto-hide settings
Config.ChatAutoHide = {
    enabled = true,              -- Enable auto-hide
    hideDelay = 10000,          -- Auto-hide delay (ms)
    fadeOutDuration = 500,      -- Fade-out duration (ms)
    messageFirstFade = 10000,   -- First message fade time (ms)
    messageSecondFade = 20000   -- Second message fade time (ms)
}

-- Font size settings
Config.FontSize = {
    chatMessage = 25,        -- Chat message font size (px)
    chatInput = 25,          -- Chat input font size (px)
    timestamp = 25,          -- Timestamp font size (px)
    suggestion = 25          -- Suggestion box font size (px)
}

-- Me command settings (/me)
Config.MeMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /me
    command = '/me',
    visibleDistance = 20.0,  
    color = '#ff00ff',             --chat text color
    backgroundColor = '#ff00ff',   --3D text color | nil mean the same with text 'color'
    displayTime = 8000,              --3D text display time (ms)
    DisplayPlayerName = false,       --show player name in chat text
    DisplayPlayerId = true,          --show player id in chat text
}

-- Do command settings (/do)
Config.DoMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /do
    command = '/do',
    visibleDistance = 20.0,
    color = '#00ffff',
    backgroundColor = nil,   -- nil mean the same with text 'color'
    displayTime = 8000,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Try command settings (/try)
Config.TryMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /try
    command = '/try',
    visibleDistance = 20.0,
    successRate = 50, -- Success rate (%)
    successColor = '#00FF00',
    failureColor = '#FF0000',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Shout command settings (/s)
Config.ShoutMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /s
    command = '/s',
    visibleDistance = 50.0,
    color = '#FFFFFF',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Low command settings (/l)
Config.LowMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /l
    command = '/l',
    visibleDistance = 5.0,
    color = '#AAAAAA',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Whisper command settings (/w)
Config.WhisperMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /w
    command = '/w',
    visibleDistance = 2.0,
    color = '#FF69B4',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Local OOC command settings (/b)
Config.LocalOocMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /b
    command = '/b',
    visibleDistance = 20.0,
    color = '#A9A9A9',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Say command settings (/say)
Config.SayMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /say
    command = '/say',
    visibleDistance = 15.0,
    color = '#FFFFFF',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Private Message command settings (/pm)
Config.PrivateMessage = {
    enabled = true,
    command = '/pm',
    replyCommand = '/r',
    replyAltCommand = '/reply',
    color = '#FFFF00',
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Dice
Config.DiceMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /dice
    command = '/dice',
    visibleDistance = 20.0,
    color = '#FFFFFF',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Coin
Config.CoinMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /coin
    command = '/coin',
    visibleDistance = 20.0,
    color = '#f9fe88ff',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Roll (random number)
Config.RollMessage = {
    enabled = true,
    OverheadEnabled = true,   -- Enable 3D overhead text for /roll
    command = '/roll',
    visibleDistance = 20.0,
    color = '#1bd42aff',
    displayTime = 8000,
    backgroundColor = nil,
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}

-- Job Channel message (job channel)
Config.JobChannelMessage = {
    enabled = true,
    command = '/jm',
    color = '#9370DB',
}

Config.PoliceMessage = {
    enabled = true,
    color = '#62a6f4ff',
    command = '/policea',
    job = {'police', 'sheriff','sahp'}     --job list that can use this command | show everyone
}

Config.DispatchMessage = {
    enabled = true,
    color = '#4766f3ff',
    command = '/dispatch',
    job = {'police', 'sheriff','sahp'}     --job list that can use this command | only show in this job list
}

Config.PoliceChannel = {
    enabled = true,
    command = '/police',      --job list that can use this command | only show in this job list
    job = {
        police = {
            color = '#4a90e2',
            label = '[PD]',
        },
        sheriff = {
            color = '#e06060',
            label = '[SHERIFF]',
        },
        sahp = {
            color = '#e06060',
            label = '[SAHP]',
        },
    }
}

Config.EMSAnnouncement = {
    enabled = true,
    color = '#e06060',
    command = '/ems',
    job = {'ambulance', 'doctor'}      --job list that can use this command | show everyone
}

Config.AdminAnnouncement = {
    enabled = true,
    color = '#e76013ff',
    command = '/a',
}

Config.Advertisement = {
    enabled = true,
    cost = 1000,
    account = 'bank', -- cash or bank
    command = '/ad',
    color = '#e76013ff',
    DisplayPlayerName = true,
    DisplayPlayerId = true,
}

-- OOC message settings (global /ooc)
Config.OocMessage = {
    enabled = true,
    command = '/ooc',
    LimitTime = 10000,  -- Cooldown time window (ms)
    LimitCount = 3,     -- Max messages allowed in the window
    color = '#FF6347',
    DisplayPlayerName = false,
    DisplayPlayerId = true,
}


-- Server message settings
Config.ServerMessage = {
    enabled = true,
    color = '#5eaeff',
}

Config.SystemMessage = {
    enabled = true,
    color = '#FF0000'
}

Config.CommandList = {
    {
        command = '/me',
        description = 'Display an action above your head',
        help = 'Usage: /me [action]',
    },
    {
        command = '/do',
        description = 'Describe an action or event',
        help = 'Usage: /do [action]',
    },
    {
        command = '/try',
        description = 'Attempt an action with 50% success rate',
        help = 'Usage: /try [action]',
    },
    {
        command = '/s',
        description = 'Shout to nearby players',
        help = 'Usage: /s [message]',
    },
    {
        command = '/l',
        description = 'Whisper to nearby players',
        help = 'Usage: /l [message]',
    },
    {
        command = '/w',
        description = 'Whisper to a specific player',
        help = 'Usage: /w [ID] [message]',
    },
    {
        command = '/b',
        description = 'Local OOC chat',
        help = 'Usage: /b [message]',
    },
    {
        command = '/ooc',
        description = 'Global OOC chat',
        help = 'Usage: /ooc [message]',
    },
    {
        command = '/say',
        description = 'Say something normally',
        help = 'Usage: /say [message]',
    },
    {
        command = '/pm',
        description = 'Send a private message',
        help = 'Usage: /pm [ID] [message]',
    },
    {
        command = '/r',
        description = 'Reply to the last private message',
        help = 'Usage: /r [message]',
    },
    {
        command = '/reply',
        description = 'Reply to the last private message',
        help = 'Usage: /reply [message]',
    },
    {
        command = '/dice',
        description = 'Roll a standard 6-sided die',
        help = 'Usage: /dice',
    },
    {
        command = '/coin',
        description = 'Flip a coin (Heads/Tails)',
        help = 'Usage: /coin',
    },
    {
        command = '/roll',
        description = 'Roll a random number',
        help = 'Usage: /roll [max]',
    },
    {
        command = '/jm',
        description = 'Job internal channel',
        help = 'Usage: /jm [message]',
    },
    {
        command = '/policea',
        description = 'Police announcement',
        help = 'Usage: /policea [message]',
    },
    {
        command = '/police',
        description = 'Police internal channel',
        help = 'Usage: /police [message]',
    },
    {
        command = '/ems',
        description = 'EMS announcement',
        help = 'Usage: /ems [message]',
    },
    {
        command = '/dispatch',
        description = 'Send a dispatch message',
        help = 'Usage: /dispatch [message]',
    },
    {
        command = '/a',
        description = 'Admin announcement',
        help = 'Usage: /a [message]',
    },
    {
        command = '/ad',
        description = 'Post an advertisement',
        help = 'Usage: /ad [message]',
    },
    {
        command = '/clear',
        description = 'Clear chat history',
        help = 'Usage: /clear',
    },
}

```
