
Installation
- Disable the default
chatresource (removeensure chatfromserver.cfg). Two chats cannot run at the same time. - Put the
sz_chatfolder into yourresourcesfolder. Do not rename the folder; the script will not run if it is renamed. - Add
ensure sz_chattoserver.cfgafterqb-core. - Configure everything in
config.lua. No database table is needed.
Requirements: QBCore (qb-core) and FiveM server build 7290 or newer.
Commands
| Command | Description |
|---|---|
T key | Opens the chat (players can change it in settings) |
/me [action] | Character action; above the head and in nearby players' chat |
/do [state] | Character or scene state |
/gme, /gdo | Hidden-name variants |
/sme [seconds] [text], /sdo ... | Text that stays for the given time |
/scancel | Removes your active texts |
/zarat [min] [max] | Rolls a dice (result decided by the server) |
/clear | Clears your own chat |
/clearall | Clears everyone's chat (staff) |
/callsign [sign] | Sets your callsign |
/reportkapat, /reportaç | Turns report messages off / on (staff) |
| Job chats | Commands you define in Config.MeslekSohbetleri |
All command names can be changed in Config.Komutlar.
Configuration
config.lua is split into sections and every setting has a short description next to it.
- General: language (
'tr'/'en'), debug, permission levels, turning the /me /do and dice modules on or off - Chat: message length, callsign rules and jobs, duty requirements, nearby OOC, job chats
- /me /do: cooldown, duration limits, distances, "Anonymous" when masked, above-head text color, duration, size and distance, hiding behind obstacles
- Dice: range limits, cooldown, animation
- Appearance: chat window size, background, stay-open time, suggestion count, all colors, above-head font and shadow, message templates (HTML)
- Texts: name format and hidden name; all player-facing texts are in
locales/tr.jsonandlocales/en.json
Debugging: set Config.Debug = true, or run chatdebug on / chatdebug off in the server console.
For Developers
Show a /me or /do text from any server script:
exports['sz_chat']:MeDo(source, 'me', 'opens the door', 5, false)
-- type ('me' / 'do'), text, duration (seconds), hide name
Standard chat events are supported, so your other scripts keep working: chat:addMessage, chat:addSuggestion, chat:removeSuggestion, chat:addTemplate, chat:clear, chatMessage.
