This guide explains how to correctly install and configure C7 Simple Chat on your FiveM server. Follow each step carefully to ensure the framework loads and functions as intended.
01. Installing the Resource
1
Download the latest release of the C7 Simple Chat;
This folder should contain the folder: c7-scripts-chat
2
Extract the .zip file's
3
Place the folders into your server's resource directory
Your resources folder should look like the following:
Altering the script to your preferred configuration has been made easy with our configuration file. To get started, you need to open the file: c7-scripts-chat/config/config.lua
1
Configuring the Framework Type
To change the framework type of the script, you need to change the following configuration lines:
2
Configuring the Basics
You must change the following lines:
3
Configuring Nearest Postal
You must change the following lines:
4
Configuring Emergency Sounds
You must change the following lines:
5
Configuring Message Types
C7 Simple Chat allows creative freedom when it comes to creating your own commands, you can create whatever commands you want. To do this, follow the following instructions:
Config.Framework = "Standalone" -- Choose between: "C7FW" or "Standalone"
Config.C7FWResource = "c7-scripts-framework-v3"
-- C7 Framework V3 Configuration:
-- Departments considered "Law Enforcement" for the /radio command.
-- These should match your Framework's Law Enforcement Departments (or Fire, EMS, Dispatch etc.)
Config.LawEnforcementDepartments = {
"LSPD",
"BCSO",
"SAHP"
}
Config.UseFrameworkID = false -- Show the Character ID in the message. !! (C7FW Only) !!
Config.ShowDepartment = true -- Show the Character's Department in the message. !! (C7FW Only) !!
Config.ShowCallsign = true -- Show the Character's Callsign in the message. !! (C7FW Only) !!
Config.DefaultRange = 20.0 -- The default range for proximity messages
Config.MaxMessageLength = 280 -- How many characters can be in a message.
Config.DefaultType = "me" -- Default type for normal chat messages (no slash)
Config.EnableWebhooks = true -- Global chat webhooks toggle (for /me, /do, /911, etc.)
Config.ConnectionWebhooks = { -- Connection webhooks (player connect / disconnect)
enabled = true,
connect = "YOUR_DISCORD_WEBHOOK",
disconnect = "YOUR_DISCORD_WEBHOOK"
}
Config.CountyETA = { -- Time randomisation for the /county command. Example output: "5m 13s"
minMinutes = 2,
maxMinutes = 8,
minSeconds = 0,
maxSeconds = 59
}
Config.displayJoinMessages = true -- Enable/Disable Join Messages (this replaces the default system messages)
Config.displayLeaveMessages = true -- Enable/Disable Leave Messages (this replaces the default system messages)
Config.displaySystemMessages = true -- Enable/Disable System Messages (commands not existing, stuff like that)
Config.NearestPostal = {
enabled = true, -- Set to false to disable.
resource = "wsrp.nearest-postal",
exportName = "getPostal"
}
Config.CallSound = {
enabled = true, -- Set to 'false' if you do not want this sound to play.
volume = 0.35, -- How loud do you want the sound to be?
file = "../sounds/emergency.ogg", -- Sound name
-- Message type keys that should trigger the sound
triggers = {
nd911 = true, -- Set to false if you do not want a sound to play for this.
nda911 = true, -- Set to false if you do not want a sound to play for this.
nd311 = true, -- Set to false if you do not want a sound to play for this.
nda311 = true, -- Set to false if you do not want a sound to play for this.
}
}
---------------------------------------------------------
-- MESSAGE TYPES
--
-- Each entry controls BOTH:
-- - behaviour (proximity/global, 3D, anonymous, 911/311, etc)
-- - chat suggestions (client side)
--
-- FIELDS:
-- enabled = true/false
-- commands = { "me", "m" } -- slash commands for this type
-- prefix = "ME" -- tag in [ME]
-- textColor = "#RRGGBB"
-- proximity = true/false -- true = range based, false = global
-- range = number or nil -- if nil uses Config.DefaultRange
-- showInChat = true/false -- if false, only 3D is shown
-- use3D = true/false -- draw 3D text above head
-- threeDRange = number or nil -- distance to see 3D (default 10.0)
-- threeDDuration= ms or nil -- duration of 3D display (default 5000)
-- wrap3D = true/false -- wraps text as *text* in 3D
-- isAnonymous = true/false -- hides name (used by darkweb, anon calls)
-- isCall = true/false -- special 911/311 formatting with location
-- callService = "911"/"311" -- used if isCall = true
-- anonymousHeader = "Anonymous" -- optional custom anon name
--
-- suggestion = {
-- description = "Shown in chat suggestions",
-- params = {
-- { name = "message", help = "What you want to say" }
-- }
-- }
---------------------------------------------------------
Config.MessageTypes = {
-----------------------------------------------------
-- BASE RP TYPES
-----------------------------------------------------
me = {
enabled = true,
commands = { "me" },
prefix = "ME",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#6d66ff",
pillColor = "#1b1940",
proximity = true,
range = 20.0,
showInChat = true,
use3D = false,
suggestion = {
description = "Send a message in the third person. (Proximity Chat)",
params = {
{ name = "message", help = "Send a message in the third person. (Proximity Chat)" }
}
}
},
["do"] = {
enabled = true,
commands = { "do" },
prefix = "DO",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#e67e22",
pillColor = "#45250a",
proximity = true,
range = 20.0,
showInChat = true,
use3D = false,
suggestion = {
description = "Send an action message (Proximity Chat)",
params = {
{ name = "message", help = "Send an action message (Proximity Chat)" }
}
}
},
ooc = {
enabled = true,
commands = { "ooc" },
prefix = "OOC",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#d0d627",
pillColor = "#40420b",
proximity = true,
range = 20.0,
showInChat = true,
use3D = false,
suggestion = {
description = "Send an out of character message (Proximity Chat)",
params = {
{ name = "message", help = "Send an out of character message (Proximity Chat)" }
}
}
},
gme = {
enabled = true,
commands = { "gme" },
prefix = "GME",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#37ed84",
pillColor = "#11522c",
proximity = false,
showInChat = true,
use3D = false,
suggestion = {
description = "Send a global message in the third person. (Global Chat)",
params = {
{ name = "message", help = "Send a global message in the third person. (Global Chat)" }
}
}
},
-----------------------------------------------------
-- MEDICAL / 3D ME
-----------------------------------------------------
med = {
enabled = true,
commands = { "med" },
prefix = "MEDICAL",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#45f5d2",
pillColor = "#18594c",
proximity = true,
range = 20.0,
showInChat = true,
use3D = true,
threeDRange = 20.0,
threeDDuration = 5000,
wrap3D = true,
suggestion = {
description = "Send a medical message (Proximity Chat)",
params = {
{ name = "message", help = "Send a medical message (Proximity Chat)" }
}
}
},
mer = {
enabled = true,
commands = { "mer" },
prefix = "ME",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#6d66ff",
pillColor = "#1b1940",
proximity = true,
range = 20.0,
showInChat = true,
use3D = true,
threeDRange = 20.0,
threeDDuration = 5000,
wrap3D = true,
suggestion = {
description = "Send a 3D and chat message in the third person (Proximity Chat)",
params = {
{ name = "message", help = "Send a 3D and chat message in the third person (Proximity Chat)" }
}
}
},
-----------------------------------------------------
-- WHISPER (3D ONLY)
-----------------------------------------------------
whisper = {
enabled = true,
commands = { "w", "whisper" },
prefix = "WHISPER",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#aaaaaa",
pillColor = "#aaaaaa41",
proximity = true,
range = 5.0,
showInChat = false,
use3D = true,
threeDRange = 5.0,
threeDDuration = 5000,
wrap3D = true,
suggestion = {
description = "Send a 3D above-the-head message without chat output",
params = {
{ name = "message", help = "Send a whispered message" }
}
}
},
-----------------------------------------------------
-- GLOBAL OOC / CCTV / DARKWEB / AD
-----------------------------------------------------
gooc = {
enabled = true,
commands = { "gooc" },
prefix = "GLOBAL OOC",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#ff8800",
pillColor = "#5c3100",
proximity = false,
showInChat = true,
use3D = false,
suggestion = {
description = "Send a global out of character message (Global Chat)",
params = {
{ name = "message", help = "Send a global OOC message" }
}
}
},
cctv = {
enabled = true,
commands = { "cctv" },
prefix = "CCTV",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#fc3fc7",
pillColor = "#360c2a",
proximity = false,
showInChat = true,
use3D = false,
suggestion = {
description = "Send a CCTV footage style message (Global Chat)",
params = {
{ name = "message", help = "Send a CCTV message" }
}
}
},
darkweb = {
enabled = true,
commands = { "darkweb" },
prefix = "DARKWEB",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#919191",
pillColor = "#2b2b2b",
proximity = false,
showInChat = true,
use3D = false,
isAnonymous = true,
anonymousHeader = "Anonymous",
suggestion = {
description = "Send an anonymous dark web message (Global Chat)",
params = {
{ name = "message", help = "Send a dark web message" }
}
}
},
ad = {
enabled = true,
commands = { "ad" },
prefix = "ADVERTISEMENT",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#c2ed7b",
pillColor = "#273018",
proximity = false,
showInChat = true,
use3D = false,
suggestion = {
description = "Send a global advertisement (Global Chat)",
params = {
{ name = "message", help = "Send an advertisement" }
}
}
},
-----------------------------------------------------
-- 911 / 311 CALLS
-----------------------------------------------------
nd911 = {
enabled = true,
commands = { "nd911" },
prefix = "NO DISPATCH 911",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#ff1f4b",
pillColor = "#420914",
proximity = false,
showInChat = true,
use3D = false,
isCall = true, -- Set to false if you do not want the background to be the pill color.
callService= "NO DISPATCH 911",
isAnonymous = false,
suggestion = {
description = "No Dispatch 911 Call (Global Chat)",
params = {
{ name = "message", help = "Send a 911 call" }
}
}
},
nda911 = {
enabled = true,
commands = { "nda911" },
prefix = "NO DISPATCH 911",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#ff1f4b",
pillColor = "#420914",
proximity = false,
showInChat = true,
use3D = false,
isCall = true, -- Set to false if you do not want the background to be the pill color.
callService= "911",
isAnonymous = true,
anonymousHeader = "Unknown Local Caller",
suggestion = {
description = "Anonymous 911 Call (Global Chat)",
params = {
{ name = "message", help = "Send an anonymous 911 call" }
}
}
},
nd311 = {
enabled = true,
commands = { "nd311" },
prefix = "NO DISPATCH 311",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#308cfc",
pillColor = "#102d52",
proximity = false,
showInChat = true,
use3D = false,
isCall = true, -- Set to false if you do not want the background to be the pill color.
callService= "311",
isAnonymous = false,
suggestion = {
description = "No Dispatch 311 Call (Global Chat)",
params = {
{ name = "message", help = "Send a 311 call" }
}
}
},
nda311 = {
enabled = true,
commands = { "nda311" },
prefix = "NO DISPATCH 311",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#308cfc",
pillColor = "#102d52",
proximity = false,
showInChat = true,
use3D = false,
isCall = true, -- Set to false if you do not want the background to be the pill color.
callService= "311",
isAnonymous = true,
anonymousHeader = "Unknown Local Caller",
suggestion = {
description = "Anonymous 311 Call (Global Chat)",
params = {
{ name = "message", help = "Send an anonymous 311 call" }
}
}
},
-----------------------------------------------------
-- COUNTY DISPATCH ( /county <postal> <service> )
-----------------------------------------------------
county = {
enabled = true,
prefix = "COUNTY",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#2bc976",
pillColor = "#123a2a",
proximity = false,
showInChat = true,
use3D = false,
isCall = true, -- Set to false if you do not want the background to be the pill color.
commands = { "county" },
suggestion = {
description = "County Dispatch (Global Chat)",
params = {
{ name = "postal", help = "Postal / area code" },
{ name = "service", help = "Service to dispatch (can include spaces)" }
}
}
},
-----------------------------------------------------
-- LAW ENFORCEMENT RADIO ( /radio <message> )
-- NOTE: C7 Framework Only
-----------------------------------------------------
radio = {
enabled = true,
prefix = "RADIO",
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#9fd6ff", -- light blue-ish text
pillColor = "#123a5a", -- dark-ish blue pill
proximity = false,
showInChat = true,
use3D = false,
isCall = true, -- Set to false if you do not want the background to be the pill color.
commands = { "radiochat" },
restrictedToLEO = true,
suggestion = {
description = "Broadcast a radio message to law enforcement (LEO only)",
params = {
{ name = "message", help = "Radio message" }
}
}
},
}
tweet = {
enabled = true, -- Is this command enabled?
commands = { "tweet" }, -- The command to use.
prefix = "TWEETER", -- The prefix of the command shown in chat.
discord_webhook = "YOUR_DISCORD_WEBHOOK",
textColor = "#6d66ff", -- What the text colour shall be.
pillColor = "#1b1940", -- What the pill colour shall be.
proximity = false, -- This command is global.
range = 20.0, -- Proximity only.
showInChat = true, -- Should it be shown in chat?
use3D = false, -- Show a 3D message above the player?
threeDRange = 20.0, -- 3D only.
threeDDuration = 5000, -- 3D only.
wrap3D = true, -- 3D only.
suggestion = {
description = "Send a tweet to everyone! (Global Chat)",
params = {
{ name = "message", help = "Send a tweet to everyone! (Global Chat)" }
}
}
},