RedM documentation

Murphy's Telegram & Mail

Getting Started

Configuration


All settings are in config/config.lua. This page covers every option.

General

lua
Config.DevMode = false -- Enable debug logging in server console
Config.framework = "REDEMRP2k23" -- "REDEMRP2k23", "rsg-core", or "vorp"
Config.YearsDelay = -125 -- Years offset for document dates (cosmetic)

Notifications

lua
Config.LetterNotification = true -- Notify recipient when a letter arrives
Config.TelegramNotification = true -- Notify recipient when a telegram arrives

Notifications only display if the recipient is online at the time of delivery.

Pricing

NUI pricing (displayed in UI and validated server-side)

lua
Config.NUI = {
-- Telegram
telegramBasePrice = 1, -- Base cost to send a telegram
telegramPriceChar = 0.03, -- Additional cost per character (body)
telegramPaidCharObject = true, -- Charge per character for subject field
telegramPaidCharSign = true, -- Charge per character for signature field
-- Letter
letterBasePrice = 2.0, -- Base cost to send a letter
letterPriceChar = 0.0, -- Additional cost per character (body), 0 = free
letterPricePerItem = 0.5, -- Additional cost per item in package
letterPaidCharObject = false, -- Charge per character for subject field
letterPaidCharSign = false, -- Charge per character for signature field
}

Server-side pricing (authoritative)

lua
Config.Prices = {
telegramBase = 1.0, -- Must match telegramBasePrice
letterBase = 2.0, -- Must match letterBasePrice
}

All prices are recalculated server-side. The NUI values are for UI display; the server never trusts client-submitted prices.

Character limits

lua
Config.NUI = {
telegramMaxChar = 120, -- Max body length for telegrams
telegramMaxCharObject = 64, -- Max subject length
telegramMaxCharSign = 32, -- Max signature length
letterMaxChar = 10000, -- Max body length for letters
letterMaxCharObject = 64, -- Max subject length
letterMaxCharSign = 32, -- Max signature length
nameMaxChar = 16, -- Max recipient name length
}

Delivery delays

lua
Config.Delays = {
telegramSeconds = 3, -- Seconds before a telegram becomes available
letterSeconds = 10, -- Seconds before a letter becomes available
}

Documents are created with status scheduled and promoted to pending after the delay expires. The promotion loop runs every 15 seconds.

Rate limiting

lua
Config.RateLimit = {
cooldownSeconds = 30, -- Minimum seconds between sends per player (0 = disabled)
}

Package constraints

lua
Config.Package = {
maxWeight = 10.0, -- Maximum total weight (kg) for a letter package
allowedTypes = { 'item_standard' }, -- Item types allowed in packages
}

Auto-cleanup / Expiration

lua
Config.Expiration = {
enabled = true, -- Enable automatic cleanup of old documents
archiveDays = 30, -- Delete documents older than N days
inboxDays = 14, -- Delete inbox entries older than N days
checkIntervalMinutes = 60, -- How often the cleanup runs (minutes)
}

UI behavior

lua
Config.UI = {
isOpen = false, -- Internal state (do not change)
inboxPollSeconds = 30, -- How often the client checks for new mail
}

Language

lua
Config.NUI = {
lang = 'fr', -- UI language: 'en' or 'fr'
}

Translations are stored in ui/lang.json and config/lang.lua.

Post offices

Define NPC locations where players send and receive mail:

lua
Config.PostOffices = {
{
id = 'rhodes', -- Unique identifier
label = 'Rhodes Post Office', -- Display name
coords = vec3(1226.776611, -1295.083984, 76.905350),-- NPC position
heading = 46.0, -- NPC facing direction
pnj = 'u_m_m_rhdtrainstationworker_01', -- Ped model
outfit = 0, -- Ped outfit variation
speechDict = "0406_U_M_M_RHDTRAINSTATIONWORKER_01", -- Ambient speech dict
speech = { -- Ambient speech lines
"CHAT_SHOPKEEPER_GOSSIP",
"CHAT_LOCAL_AREA",
"HOWS_IT_GOING",
}
},
-- Add more post offices here...
}

Mailboxes

Job-based mailboxes allow routing mail to a role instead of a specific person:

lua
Config.Mailboxes = {
{
id = 'sheriff_rhodes', -- Unique identifier (used in recipientData)
label = 'Sheriff Rhodes Mailbox', -- Display name
jobs = { 'sheriff', 'marshal' }, -- Jobs that can access this mailbox
},
-- Add more mailboxes here...
}

Only players with a matching job will see and access the mailbox contents.

Fonts

Fonts available for document rendering. Telegrams get a random font; letters let the player choose.

lua
Config.Fonts = {
'BethEllen', -- Handwriting, irregular
'Caveat', -- Handwriting, casual
'DancingScript', -- Cursive, elegant
'MarckScript', -- Handwriting, relaxed
'TypeRa', -- Typewriter monospace
}

Item names

lua
Config.Items = {
letterItem = 'post_letter', -- Inventory item name for letters
telegramItem = 'post_telegram', -- Inventory item name for telegrams
}

These must match the items registered in your framework's item registry (see Installation).


Last updated: March 26, 2026