Skip to main content
The sh-telegram resource brings a fully period-accurate communication system to your RedM roleplay server. Players visit staffed telegraph office locations, pay a clerk, and send written telegrams or physical item parcels to any other character using a unique six-character identifier. The system ships with a western-styled Vue 3 NUI inbox, configurable mishap events for parcels, and Discord webhook logging for every transaction.

Framework Support

sh-telegram supports both VORP and RSG frameworks. Set the framework in your server-side config.lua before starting the resource:
config.lua (server)
Config.Framework = 'vorp'  -- 'vorp' or 'rsg'

Localization

sh-telegram ships with English, Spanish, and German locale files. Set the active locale in the config:
config.lua (server)
Config.Locale = 'en'  -- 'en', 'es', or 'de'
Community-contributed translations can be added by duplicating an existing locale file and adjusting the string values.

Telegram IDs

Every character receives a unique Telegram ID the first time they interact with a telegraph office. You can choose from three ID formats to match your server’s theme:
A six-digit numeric code assigned randomly, for example 034921. Best for servers that want a neutral, registry-style identifier.
config.lua (server)
Config.TelegramIdMode = 'numeric'

Features

Players compose a text message at the telegraph office counter and pay a base fee to dispatch it. An optional anonymous send mode obscures the sender’s identity for an additional surcharge. Sent telegrams are stored per-character in the database and appear in the recipient’s NUI inbox.
The NUI inbox uses Vue 3 with western-themed styling. Players can browse their message list, open individual telegrams, reply directly from the view pane, and delete messages they no longer need. An unread indicator persists on the HUD when new telegrams are waiting, and you can position the indicator anywhere on screen from the client config.
Players can bundle physical items into a parcel and send it to another character’s Telegram ID. You control the base parcel fee, the maximum number of distinct item types per parcel, and optional per-item surcharges. The recipient collects the parcel from the telegraph office.
Enable mishap events to simulate the unpredictability of frontier mail. When a parcel triggers a mishap, one of three outcomes can apply: the parcel arrives damaged (cosmetic label only), the recipient receives only part of the contents (lost_some), or the entire parcel is lost (lost_all). You configure which outcome is active, the overall chance percentage, and the loss percentage range.
Players can manually request that an uncollected parcel be returned to them for an optional fee. You can also enable automatic returns after a configurable number of unclaimed days so that inventory items are never permanently stuck in transit.
Players save frequently contacted characters with a friendly display name and can mark favorites for quick access when composing a new telegram or parcel.
Define telegraph office locations in the client config. Each location spawns a period-appropriate NPC clerk and a world blip so players can find offices on the map. You can add as many office locations as your map warrants.

Configuration

Server Config

The following block covers every server-side option. Copy it into your config.lua and adjust values to match your server’s economy and feature preferences:
config.lua (server)
Config.Framework = 'vorp'   -- 'vorp' or 'rsg'
Config.Locale    = 'en'     -- 'en', 'es', or 'de'

Config.UseSH_Identity = false  -- Require sh-identity ID card to use the office

Config.Cooldown = 60  -- Seconds between sends per character (nil = no cooldown)

Config.Command = {
    enabled     = true,
    commandname = 'telegram',   -- /telegram opens the telegraph UI
    permission  = nil           -- e.g. 'telegram.use' to gate with ACE
}

-- Telegrams
Config.TelegramFee               = 2.5   -- Base fee to send a telegram
Config.TelegramAnonymousExtraFee = 5.0   -- Extra fee for anonymous send
Config.TelegramIdMode            = 'town' -- 'numeric', 'town', or 'custom'
Config.CustomPrefix              = 'SPAZ-' -- Used when IdMode = 'custom'

-- Parcels
Config.EnableParcels  = true
Config.ParcelBaseFee  = 5.0
Config.ParcelMaxItems = 4        -- Max distinct item types per parcel
Config.ParcelItemFees = {
    -- ['goldbar'] = 10.0,       -- optional per-item surcharge
}

Config.ParcelMishaps = {
    enabled       = true,
    chancePercent = 15,          -- % chance a mishap occurs on each send
    types = {
        lost_some = false,       -- some items/quantities lost
        lost_all  = false,       -- whole parcel lost
        damaged   = true,        -- cosmetic 'damaged' label added
    },
    lostSomeMinPercent = 20,     -- min % of quantity lost on lost_some
    lostSomeMaxPercent = 60,     -- max % of quantity lost on lost_some
    showDamagedSuffix  = true,   -- append '(Damaged)' to labels
    notifyReceiver     = true,
    notifySender       = false,
}

Config.ParcelReturn = {
    enabled              = true,
    manualReturnFee      = 0.0,  -- fee to return an uncollected parcel (0 = free)
    notifySenderOnReturn = true,
    autoReturn = {
        enabled              = false,
        daysUnclaimed        = 5,   -- days before auto-return triggers
        checkIntervalMinutes = 30,  -- how often the server scans for old parcels
    },
}

Config.Discord = {
    enabled         = true,
    webhook         = '',                                          -- single webhook for everything
    telegramWebhook = 'https://discord.com/api/webhooks/YOUR_WEBHOOK', -- per-type override
    parcelWebhook   = 'https://discord.com/api/webhooks/YOUR_WEBHOOK',
    username        = 'Telegraph Office',
    avatar          = '',
}

Client Config

NPC clerk spawn points, map blip settings (sprite, color, scale), and the on-screen position of the unread-telegram HUD indicator are all defined in the client-side config.lua. Each office entry uses a vector4 coordinate (x, y, z, heading) for the NPC’s spawn position and facing direction.
After editing either config file, restart the resource with ensure sh-telegram in your server console for changes to take effect.

sh-identity Integration

If your server runs sh-identity, you can require players to hold a valid identity card before they can use the telegraph office:
config.lua (server)
Config.UseSH_Identity = true
When this option is enabled, characters without a registered identity card receive a clerk dialogue prompting them to obtain one before sending.
Enable Config.UseSH_Identity if your server uses identity cards as a prerequisite for most civic services — it keeps the roleplay loop consistent and gives the sh-identity resource meaningful utility beyond document checks.

Installation

1

Add the resource

Copy the sh-telegram folder into your server’s resources directory.
2

Add to server.cfg

Add ensure sh-telegram to your server.cfg after your framework resource and, if applicable, after sh-identity.
server.cfg
ensure vorp_core       # or rsg-core
ensure sh-identity     # if UseSH_Identity = true
ensure sh-telegram
3

Import the SQL file

Run the SQL file found in the sql/ folder of the resource against your database to create the required tables for telegrams, parcels, contacts, and character IDs.
4

Configure

Open server/config.lua and set your framework, fees, ID mode, and webhook URLs. Then open the client config to place your telegraph office NPC locations.
5

Restart and test

Start your server, approach an office NPC, and verify the clerk interaction opens correctly. Send a test telegram between two characters to confirm delivery and inbox display.
If you change Config.TelegramIdMode after the resource has been running, it is recommended to clear all existing Telegram ID records from the database so that IDs are regenerated consistently in the new format. Mixed-format IDs in the same database can cause lookup failures.