Server Widgets
Add your own lines to the HUD: a reputation bar, a bounty, a job counter, anything. They show in the Server widgets group, which players can move like the rest.
🛠️ From config
Config.CustomWidgets = {
{
id = 'rep',
label = 'Reputation',
type = 'bar',
icon = 'trophy',
color = '#e3b65a',
max = 100,
source = { export = { 'my-rep-script', 'GetReputation' } },
interval = 5000,
},
{
id = 'bounty',
label = 'Bounty',
type = 'text',
icon = 'crosshair',
source = { state = 'bounty' },
},
}| Field | What it does |
|---|---|
type | bar (needs a number), text or badge |
icon | star, trophy, crosshair, shield, skull, coffee, pill, footprints, heart, eye, flame, snowflake, leaf, moon and more |
max, suffix | For bars and numbers |
source.export | A client export that returns a number, a string, or { value = 50, text = '50 / 100' } |
source.state | A key in LocalPlayer.state |
interval | How often to read it, in milliseconds |
🔌 From a script
exports['kartik-hud']:RegisterWidget({ id = 'wanted', label = 'Wanted', type = 'text', icon = 'skull', color = '#d9534a' })
exports['kartik-hud']:SetWidget('wanted', 3, '3 stars')
exports['kartik-hud']:RemoveWidget('wanted')From the server, use exports['kartik-hud']:SetWidget(source, id, value, text).