Configuration
Opciones de configuración, permisos y canales.
Ver demo interactiva ↗All examples below are based on the editable files included in NW RP Chat. Restart nw_rpchat after changing Lua config files.
File map
| File | Purpose |
|---|---|
config/config.lua |
Framework, language, roles/jobs, commands, proximity, channels, spam, integrations |
config/framework.lua |
Framework aliases, Qbox fallback, detection |
config/server.lua |
Server-only secrets (webhooks, optional voice key) |
locales/en.lua, locales/es.lua |
English and Spanish messages |
bridge/server.lua |
Framework identity and permission bridge |
custom/client.lua, custom/server.lua, custom/hooks/ |
Adapters and overrides |
html/config.js, html/nw-theme.css |
NUI defaults and colors; player preferences may override defaults |
Framework and locale
Config.Framework = 'auto' -- qbx / qbcore / esx / standalone
Config.Locale = 'en' -- or 'es'
auto detection checks qbx_core, then qb-core, then es_extended, then standalone. Edit aliases and QboxUseQbBridgeFallback in config/framework.lua if needed.
Proximity, spam and staff
Normal RP chat and /me//do are local by default. Distances default to 20 m normal, 5 m whisper and 40 m shout. Config.Distance, Config.ProximityChat and Config.CommandScopes control ranges and local/global delivery.
Config.AntiSpam defaults to a 240-byte max message length, 1.2-second message cooldown and 6 messages per 8-second window, with duplicate detection and progressive temporary penalties. Config.Staff supports ACE, framework roles or both. Example ACE strings are not.adminhub, not.admin, not.developer and group.admin; adapt them to your permission scheme, not blanket admin access.
Channels and permissions
Use Config.Channels, Config.ChannelTemplates and documented exports for job, gang, members, ACE and staff channels. Player access and recipient visibility are checked on the server. requireDuty optionally checks whether a framework player is on duty. Grade/level-based access is not natively advertised; write a verified bridge/hook if you need it.
/rpol is restricted to police on duty and delivered locally by default; it is not proximity voice communication. Example police, EMS and mechanic channels are off until you enable them.
NW Notify, logs and voice
Config.Integrations.notify = {
mode = 'auto',
order = {'custom','framework','nw_notify','native'}
}
nw_notify is optional, and auto mode may select a custom or framework adapter first. Logs/webhooks are off by default. Save credentials in server-only config/server.lua, never browser files, Lua shared configs, screenshots or support tickets. The optional voice adapter is inactive and does not include a ready-to-use microphone capture control.
Player controls
Players can open /nwchatsettings and modify the interface, readability, messages, tools and available commands. Personal settings are saved locally, which may override html/config.js defaults. Use the panel's Reset when evaluating new UI defaults.
For a complete key-by-key reference and editable adapter contracts, see docs/CONFIGURATION.md in the ZIP; the source ZIP is the authoritative reference if you have a customized build.