Skip to Content
OLS HUDConfigsMain configuration

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

FileRole
configs/main.luaServer 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):

OptionDefault (example)What it does
server.name"Oceanline"Display name of your server
server.type"Roleplay"Short label for the type of server

Settings command

OptionDefaultWhat 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

OptionDefaultWhat it does
maxVoiceRange3For 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

OptionDefaultWhat it does
disableChatfalseIf true, the HUD’s built-in chat is turned off. Use this if another resource handles chat.
autoHideHelpNotifytrueIf 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.

FieldTypeDefault (example)Meaning
enabledbooleantrueRegister the command or not
commandNamestring”announce”

In-game command (e.g. /announce)

allowedGroupslist of strings{ "admin" }Who may broadcast
durationnumber (ms)10000How 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).

FieldTypeDefault (example)Meaning
enabledbooleantrueRegister commands or not
commandNameslist of strings{ "teamchat", "tc" }

Aliases, e.g. /teamchat and /tc

allowedGroupslist 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.

FieldTypeDefault (example)Meaning
enabledbooleantrueRegister the command or not
commandNamestring”ids”Command name
radiusnumber (meters)5.0Search 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.

FieldTypeDefault (example)Meaning
enabledbooleantrueRegister the command or not
commandNamestring”ooc”Command name
radiusnumber (meters)5.0Intended 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)

configs/main.lua
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.

Last updated on