Installation
๐ฆ Installation
Section titled โ๐ฆ Installationโ-
Remove Default Chat Navigate to your FiveM artifacts folder and remove or disable the original chat resource:
Artifacts/citizen/system_resources/chatTip: You can rename the folder to
chat_backupinstead of deleting it. -
Add RS Chat
- Place the
rs_chatfolder in your serverโs resources directory (e.g.,resources/[scripts]/). - Add to your
server.cfg:ensure rs_chat
- Place the
-
Configure Edit
config.luato customize:- Enable/disable commands
- Set colors and themes
- Configure emergency jobs
- Choose your language
โ ๏ธ QBCore (qb-core) Compatibility
Section titled โโ ๏ธ QBCore (qb-core) CompatibilityโIf youโre using qb-core (standard QBCore Framework), you need to disable the built-in /me and /ooc commands to prevent conflicts with rs_chat.
Disable /me and /ooc Commands
Section titled โDisable /me and /ooc CommandsโFile: qb-core/server/commands.lua
Find the /ooc command (around line 272-302) and /me command (around line 304-323), then wrap them with --[[ and --]]:
--[[-- Out of Character ChatQBCore.Commands.Add('ooc', Lang:t('command.ooc.help'), {}, false, function(source, args) ...end, 'user')--]]
--[[-- Me commandQBCore.Commands.Add('me', Lang:t('command.me.help'), ... ...end, 'user')--]]Note: After updating qb-core, you may need to re-apply these changes.
โ ๏ธ QBX Core Compatibility
Section titled โโ ๏ธ QBX Core CompatibilityโIf youโre using qbx_core (Qbox Framework), you need to make two modifications for full compatibility.
Fix 1: MOTD Export Error
Section titled โFix 1: MOTD Export ErrorโProblem:
SCRIPT ERROR: @qbx_core/client/events.lua:19: No such export addMessage in resource chat
File: qbx_core/client/events.lua
Find this code (around line 17-20):
local motd = GetConvar('qbx:motd', '')if motd ~= '' then exports.chat:addMessage({ template = motd })endChange exports.chat to exports.rs_chat:
local motd = GetConvar('qbx:motd', '')if motd ~= '' then exports.rs_chat:addMessage({ template = motd })endFix 2: Disable QBX Coreโs /me Command
Section titled โFix 2: Disable QBX Coreโs /me CommandโProblem: QBX Core has its own /me command that conflicts with rs_chat.
Solution: Comment out qbx_coreโs /me command so rs_chat handles it instead.
Step 1: In qbx_core/server/commands.lua, find the /me command (around line 409) and wrap it with --[[ and --]]:
--[[lib.addCommand('me', { ...}end)--]]Step 2: In qbx_core/client/events.lua, find the state bag handler (around line 165) and wrap it with --[[ and --]]:
--[[-- Me commandAddStateBagChangeHandler('me', nil, function(bagName, _, value) ...end)--]]Note: After updating qbx_core, you may need to re-apply these changes.