Northline Solutions

Northline Solutions Documentation

View documentation articles and categories here!


NL-Chat


NL-Chat - Advanced Discord-Integrated Chat System for FiveM

📖 Table of Contents

🛠 Installation

  1. Download & Extract

    Ensure ox_lib is installed: https://overextended.dev/ox_lib
    Drag [NL-Solutions]/nl-chat folder into your resources/
    
  2. Add to server.cfg

    ensure ox_lib
    ensure nl-chat
    
  3. Restart server or refresh + start nl-chat

  4. Setup Discord Bot (required for tags/avatars) - See below

Done! Chat is now fully replaced. Press T to type.


⚙️ Configuration

All settings in chatconfig.lua (server-side only).

Discord Integration

northline.Config.ChatDiscord = {
    Enabled     = true,
    BotToken    = 'YOUR_BOT_TOKEN',  -- Create bot below
    GuildId     = '123456789012345678',  -- Copy Server ID (right-click server icon)
    CacheTTL    = 300,  -- Refresh roles every 5 min
}

Role-Based Tags (Highest priority first)

northline.Config.ChatTags = {
    Default = { tag = 'User', color = '222,222,222' },
    Tags = {
        { tag = 'Owner', color = '0,255,102', role = '123456789012345678' },  -- Discord role ID
        { tag = 'Admin', color = '255,0,0',   role = '123456789012345679' },
        -- Add more...
    },
    Custom = {
        AllowedRole = '123456789012345678',  -- Who can use /chattag custom
        MinLength = 2, MaxLength = 15,
        Blacklist = { 'admin', 'owner', 'mod' }
    }
}

Chat Settings

northline.Config.ChatSettings = {
    AntiSpam       = 5,    -- Seconds between messages
    MaxCharacters  = 300,
    ProximityRange = 15.0, -- /me /do range (meters)
    AutoAds = {
        'Join Discord.gg/Northline',
        'Apply at forms.Northline.lol'
    }
}

Webhooks (Optional - per channel)

northline.Config.ChatWebhooks = {
    Master = 'https://discord.com/api/webhooks/...',  -- ALL channels mirror here
    OOC    = 'https://discord.com/api/webhooks/...',
    Me     = '',
    Twitter = 'https://discord.com/api/webhooks/...',
    -- etc.
}

Features

Feature Description
Discord Sync Live role tags + Discord avatars
10 Channels OOC, Me, GlobalMe, Do, Twitter, Ad, DarkWeb, DM
Proximity /me /do only shows to nearby players
Custom Tags /chattag menu - role or custom (permissioned)
Anti-Spam Cooldowns, blacklists, length limits
Staff Tools /clearchat, /announce, webhook logs
NUI UI Animated messages, avatars, hover effects
ox_lib Native menus/notifications
Auto-Ads Rotating server promotions

⌨️ Commands

T           - Open chat input
/chattag    - Tag selection menu (roles + custom)
/chathelp   - List all commands
/togglechat - Hide/show chat messages
/clear      - Clear your local chat

📢 CHANNELS:
ooc [msg]     - Global out-of-character
me [action]   - Local emote (nearby players)
gme [action]  - Global emote (everyone)
do [desc]     - Local action description
tw [msg]      - Twitter-style post
ad [msg]      - Server-wide advertisement
darkweb [msg] - Dark web channel
dm [id] [msg] - Private message player ID

🛠 STAFF:
clearchat     - Clear everyone's chat
announce [msg]- Staff broadcast (big red banner)

Examples:

/me waves hello
/do *The door creaks open slowly*
dm 5 Hey, meet at the docks?
twt Breaking: LSPD corruption scandal! #news

🔐 Permissions

Staff Commands (/clearchat, /announce)

Either:

  • Discord role ID in ChatStaff.ClearChatRole
  • FiveM ACE: chat.clearchat

Custom Tags

  • Discord role ID in ChatTags.Custom.AllowedRole

🤖 Discord Bot Setup (5 minutes)

  1. Go to Discord Developer Portal
  2. New Application → Name it 'NL-Chat'
  3. Bot tab → Add BotCopy Token (paste in config)
  4. Privileged Gateway Intents → Enable 'SERVER MEMBERS INTENT'
  5. OAuth2 → URL Generator:
    • Scopes: bot
    • Permissions: Read Messages/View Channels + View Audit Log
  6. Copy generated URL → Invite bot to your Discord server
  7. Copy your Server ID: Right-click server icon → Copy ID → Paste in config

✅ Bot ready! Roles/tags/avatars will appear automatically.


📊 Webhook Logging

Every message type logs to Discord with rich embeds:

Player: [ID] Name  🖥️
Discord: @username
Message: Hello world!
Server: Northline | 2024-10-01 12:34

Separate webhook per channel + master mirror.


🐛 Troubleshooting

Issue Solution
No tags/avatars Check bot token, guild ID, SERVER MEMBERS INTENT enabled
Commands missing Ensure ox_lib running first
Chat not opening Default chat disabled automatically
Webhooks silent Verify URLs valid (test in browser)
Proximity not working Check ProximityRange in config

Console Errors? Check fxserver.log for Discord API issues.


Support: Issues? https://discord.gg/j4YwdCcvB7

© Northline Solutions

Northline Solutions

Welcome to Northline Solutions! Founded in March 2023, We are excited to bring some basic but yet unique FiveM scripts, And discord bots! What do we offer? I am currently making 100% standalone assets/scripts so all servers can enjoy! We currently have ⁠PerkoReports, Comserv, Sec Cams and have more releases coming out soon! What can you expect? We will constantly push updates to our scripts (even without suggestions) and have some exciting ideas planned for the future! Hope you're ready to tag along!

Copyright © 2026 Northline Solutions - All rights reserved.

Useful Links

Gift Cards

Our Discord

FAQs