legacy-scoreboard
Configuration
All config.lua keys and their defaults.
Configuration
All configuration lives in config.lua (shared).
Config.OpenKey
- Type: string
- Default:
'HOME'
The GTA control name used as the default key for the scoreboard keybind (registered via lib.addKeybind). Players can still rebind this in their GTA keybind settings.
Config.KeybindLabel
- Type: string
- Default:
'HOME'
Human-readable label sent to the NUI (keybind field) and shown as the footer keycap hint. This is purely cosmetic — it does not change the actual bound key. If you change Config.OpenKey, update this to match, or players will see the wrong key hint.
Config.Services
- Type: table[]
- Default: see
config.lua
Array of city service group definitions shown in the services strip. Each entry has:
{ id = 'police', label = 'LSPD', icon = 'Shield', color = '...', jobs = { 'police' } }
jobsis a list of framework job names counted toward this group. Only players currently on duty in one of these jobs are counted.iconmust be one of the names exported by the UI'sfa.jsx(Shield,Ambulance,Wrench,Taxi,Scale,Vault,Gem,Store,SackDollar,Truck,House). Any other string silently fails to render.- The service whose
id == 'police'is special: its on-duty count is used ascopsOnline, which drivesConfig.Activitiesgating. Renaming or removing thepoliceid breaks allminCopsgating (it will read as 0).
Config.VisibleJobs
- Type: table<string, string>
- Default:
{
police = 'LSPD',
bcso = 'BCSO',
ambulance = 'EMS',
mechanic = 'Mechanic',
taxi = 'Taxi',
trucker = 'Trucker',
}
Maps job name → display label for jobs that are exposed in a player's job/jobLabel fields and get a colored chip / row highlight. Jobs not listed here are always omitted from other clients' view of that player, regardless of anonymity settings. The color only renders if the same key also exists in the UI's JOB_COLORS map (Scoreboard.jsx) — otherwise only the label shows.
Config.Activities
- Type: table[]
- Default: see
config.lua
Array of activity/heist definitions shown in the sidebar:
{ id = 'pacific', label = 'Pacific Standard', icon = 'Vault', minCops = 3 }
An activity's open flag is true when the police service's on-duty count (copsOnline) is >= minCops. icon must match a name exported by fa.jsx.
Config.ShowStaffBadge
- Type: boolean
- Default:
true
When true, non-anonymous players who pass Framework.GetIsFrameworkAdmin (via legacy-lib) are flagged staff = true in the payload and shown with a staff badge. Has no effect on anonymous players — staff is always false for them. Requires legacy-lib to be running.
Config.RefreshCooldownMs
- Type: number
- Default:
1000
Minimum milliseconds allowed between successful legacy-scoreboard:getData calls from the same player, tracked server-side via GetGameTimer() in a lastRequest table keyed by src. Requests inside the cooldown window return nil, which the client interprets as "do not open the board" — no error is raised.