Koja Scripts

Chat

Koja Chat: a drop-in replacement for the default FiveM chat with channel tabs, RP commands, moderation, speech bubbles, polls, 12 styles and a server and client API built on koja-lib.

Koja Chat

Koja Chat is a roleplay chat for FiveM that replaces the default chat resource. Every script that uses chat:addMessage, chat:addSuggestion, chatMessage or exports.chat keeps working, and you get channel tabs, RP commands, moderation and a clean API on top. It is built on koja-lib.

This section covers version 1.2.1 of the resource.

What you get

AreaWhat is in it
Channel tabsLocal (proximity), OOC, Social, department chat, Staff. Unread counters, and the active tab is where your message goes
RP commands/me, /do, /try, /looc, /s, /w, /ooc, /twt, /dw, /ad, /dep, /a with optional 3D text or speech bubbles above the head
Private messages and reports/pm, /r with a sound ping, /report to every online staff member
Moderation/mute saved by license, /slowmode, /clearall, /announce, anti-spam with auto mute, word filter, link blocking, staff can delete messages
SuggestionsHelp text, the parameter you are typing is highlighted, Tab to complete
Quality of lifeMessage history, emoji picker, shortcodes, **bold** *italic* ~~strike~~, @mentions, typing indicator, timestamps, fade when idle, select and copy
Player settingsStyle, main colour, position, size, width, background opacity, timestamps, fade, sounds and compact mode, saved per player
12 stylesappearance, velmor, velmor2, grids, modern, emerald, samp, nightshift, discord, twitch, bubble, terminal
Speech bubblesAnimated bubbles above heads, messages type out letter by letter
ImagesLink previews from whitelisted hosts and Ctrl+V image paste
ExtrasPolls, a pinned message, key binds, /coords, /ignore, an optional developer console tab
LogsDiscord webhooks per channel, private messages, reports and moderation
Developer APIServer and client exports, hooks, custom channels and commands, badges, import.lua and events

Quick facts

  • Frameworks: ESX, QBCore, QBX and custom, through koja-lib (names, jobs, money, admin groups).
  • Requires: koja-lib. It replaces the default chat resource (provide 'chat').
  • OneSync: recommended, because proximity is calculated on the server. Without it the clients filter by distance.
  • Storage: no database. Mutes and the pinned message are kept in the resource KVP, key binds and player settings on the player's side.
  • Languages: en and pl.
  • Cleanup: everything another resource registers (channels, commands, hooks) is removed when that resource stops.

Start here

  1. Install it

    Installation — requirements, removing the default chat and server.cfg order.
  2. Configure it

    Configuration — every option in editable/config.lua and the server and client hooks.
  3. Learn the commands

    Commands — player, RP and staff commands.
  4. Use it from your own code

    Developer API — exports, hooks, channels, polls, events and default chat compatibility.

In this section