Skip to content

Roles: who gets which channel

A radio's knob simply skips channels its holder is not programmed for. Roles come from four places, combined.

player:SetAttribute("RadioRole", "Security")
-- or several:
player:SetAttribute("RadioRole", "Security,Supervisor")

Config.Roles.Teams maps team names to roles.

Teams = { ["Security"] = "Security", ["Engineering"] = "Engineering" },

Config.Roles.Groups maps a group ID and minimum rank to a role.

Groups = { { GroupId = 1234567, MinRank = 100, Role = "Supervisor" } },

Config.Roles.Users maps a UserId straight to roles.

Users = { [214598728] = "Dispatch,Management" },

Full example

Config.Roles = {
    Enabled = true,
    Default = "Staff",
    Attribute = "RadioRole",
    Teams  = { ["Security"] = "Security", ["Engineering"] = "Engineering" },
    Groups = { { GroupId = 1234567, MinRank = 100, Role = "Supervisor" } },
    Users  = { [214598728] = "Dispatch,Management" },
    AllAccessInStudio = true,   -- (1)!
}
  1. Unlocks every channel in Studio so you can test alone. It has no effect on a live server.

Talk priority

Config.Roles.Priority maps a role to a talk priority. Higher wins a busy channel.

Role Priority
Radio 1
Security, Management, Supervisor 2
Dispatch, Console 3
Emergency 4

Roles that gate powers

These lists live in Config.Handset:

List Grants
InterruptRoles Break into a busy channel
HighPriorityRoles High-priority transmit
EmergencyClearRoles Acknowledge and clear emergencies
RadioKillRoles Permanently disable a radio
RadioCheckRoles Run radio checks
RadioDisableRoles Disable / enable radios
ResponseInhibitRoles Response inhibit