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
| Area | What is in it |
|---|---|
| Channel tabs | Local (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 |
| Suggestions | Help text, the parameter you are typing is highlighted, Tab to complete |
| Quality of life | Message history, emoji picker, shortcodes, **bold** *italic* ~~strike~~, @mentions, typing indicator, timestamps, fade when idle, select and copy |
| Player settings | Style, main colour, position, size, width, background opacity, timestamps, fade, sounds and compact mode, saved per player |
| 12 styles | appearance, velmor, velmor2, grids, modern, emerald, samp, nightshift, discord, twitch, bubble, terminal |
| Speech bubbles | Animated bubbles above heads, messages type out letter by letter |
| Images | Link previews from whitelisted hosts and Ctrl+V image paste |
| Extras | Polls, a pinned message, key binds, /coords, /ignore, an optional developer console tab |
| Logs | Discord webhooks per channel, private messages, reports and moderation |
| Developer API | Server 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 defaultchatresource (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:
enandpl. - Cleanup: everything another resource registers (channels, commands, hooks) is removed when that resource stops.
Start here
-
Install it
Installation — requirements, removing the default chat andserver.cfgorder. -
Configure it
Configuration — every option ineditable/config.luaand the server and client hooks. -
Learn the commands
Commands — player, RP and staff commands. -
Use it from your own code
Developer API — exports, hooks, channels, polls, events and default chat compatibility.