Main configuration
The file configs/main.lua controls how the HUD identifies your server, which voice and chat behavior to use, staff commands, and how other scripts call notifications and progress bars.
What you are editing
| File | Role |
|---|---|
configs/main.lua | Server branding on the HUD, commands, voice display limits, built-in chat, and API names for notify / announce / help / progress |
After any change, restart the ols_hud resource (or the whole server) so settings reload.
Server name and type
These strings appear in the HUD (for example header or info areas):
| Option | Default (example) | What it does |
|---|---|---|
server.name | "Oceanline" | Display name of your server |
server.type | "Roleplay" | Short label for the type of server |
Settings command
| Option | Default | What it does |
|---|---|---|
settingsCommand | "settings" | Chat command that opens the in-game HUD settings (players can toggle elements and drag layout) |
Example: if you set settingsCommand = "hud", players use /hud.
Voice display
| Option | Default | What it does |
|---|---|---|
maxVoiceRange | 3 | For pma-voice, caps how many proximity “steps” the HUD shows at the top. Salty Chat can override the max with the live range count from the plugin. |
Chat and help prompt
| Option | Default | What it does |
|---|---|---|
disableChat | false | If true, the HUD’s built-in chat is turned off. Use this if another resource handles chat. |
autoHideHelpNotify | true | If true, the small “press key” help prompt hides on its own after a short time. If false, it stays until something calls hide help notify (see Client exports). |
Staff and player commands
Each block can be turned off with enabled = false. Command names are configurable; defaults below match the stock config.
allowedGroups (plain language)
allowedGroups is a list of group names your framework exposes through OLS Base (for example admin, mod). The server checks them when someone runs a restricted command. Use the same names your ESX / QBCore / Qbox setup uses for jobs or staff ranks (see OLS Base).
Announce (announceCommand)
Who can use: players in any listed group.
Who sees it: everyone online gets the big announcement banner.
| Field | Type | Default (example) | Meaning |
|---|---|---|---|
enabled | boolean | true | Register the command or not |
commandName | string | ”announce” | In-game command (e.g. |
allowedGroups | list of strings | { "admin" } | Who may broadcast |
duration | number (ms) | 10000 | How long the banner stays |
Team chat (teamChatCommand)
Who can use: players in any listed group.
Who sees it: only players who share at least one of those groups (staff-to-staff style).
| Field | Type | Default (example) | Meaning |
|---|---|---|---|
enabled | boolean | true | Register commands or not |
commandNames | list of strings | { "teamchat", "tc" } | Aliases, e.g. |
allowedGroups | list of strings | { "admin" } | Who may send and who is in the recipient pool |
Nearby IDs (idsCommand)
Who can use: typically everyone (command is registered without an extra group check in the stock script).
What it does: lists nearby players’ character names in a notification.
| Field | Type | Default (example) | Meaning |
|---|---|---|---|
enabled | boolean | true | Register the command or not |
commandName | string | ”ids” | Command name |
radius | number (meters) | 5.0 | Search radius around the player |
Local OOC (oocCommand)
Who can use: everyone (stock script).
Who sees it: players within range of the speaker.
The config includes oocCommand.radius for how far OOC should reach. In the current server script, the nearby-player search for OOC uses the same radius as idsCommand (not oocCommand.radius). Until that is aligned in code, changing idsCommand.radius also changes who receives OOC. See Commands for usage.
| Field | Type | Default (example) | Meaning |
|---|---|---|---|
enabled | boolean | true | Register the command or not |
commandName | string | ”ooc” | Command name |
radius | number (meters) | 5.0 | Intended OOC range (see note above) |
API block (api)
The api table lets you rename exports and events and reorder arguments for:
notify,announce,helpNotify,hideHelpNotify,progress,cancelProgress
Set export or event to false to disable that integration path.
Developers: see Client exports and Server exports for examples. The comments inside configs/main.lua also describe positional vs table arguments.
Minimal example (structure only)
return {
server = { name = "My City", type = "Roleplay" },
settingsCommand = "settings",
maxVoiceRange = 3,
announceCommand = { enabled = true, commandName = "announce", allowedGroups = { "admin" }, duration = 10000 },
teamChatCommand = { enabled = true, commandNames = { "teamchat", "tc" }, allowedGroups = { "admin" } },
idsCommand = { enabled = true, commandName = "ids", radius = 5.0 },
oocCommand = { enabled = true, commandName = "ooc", radius = 5.0 },
disableChat = false,
autoHideHelpNotify = true,
api = { -- see file for full default api table
},
}Next: Safezones for configs/safezone.lua.