π¬SLEEK CHAT
Here check the installation guide
INSTALLATION GUIDE
Download from KEYMASTER and Unzip the
forge-chat.pack.zip
and place this folder in your server's resource folder.Add the resource to your server start config:
ensure forge-chat
,
the name of the folder must not be changed or the resource will not function correctly.Delete any other chat you have. There is usually a chat in
[cfx-default] > [gameplay]
. Browse through all the folders on your server until you find a script called CHAT or similar.Clear the cache of your server and also of your own FiveM.
Reboot the entire server with the forge script well ensured in your server.cfg.
This script does not have any SQL to install.
Do not rename this script, this may cause it to fail when opening the interface.
CONFIG
The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.
To activate the chat LOGs, you must go to OPEN.lua and add the webhook of the channel you want.
Fill all the CONFIG very carefully. At the end of the document you will see all the variables that you can use when modifying or creating new commands.
Remember that you can create all the commands you want.
Config = { }
--[[
====================================================================================================
π¦ FRAMEWORK CONFIGURATION
====================================================================================================
]]--
Config.Framework = {
FrameworkName = 'ESX', -- ESX, QBCore or Standalone
QBCoreFileName = 'qb-core',
OldESX = false, -- If you are using an old version of ESX set this to true
ESXEvent = 'esx:getSharedObject',
ESXObject = 'es_extended',
SQLWrapper = 'oxmysql' -- oxmysql / mysql-async / ghmattimysql
}
--[[
====================================================================================================
β¨οΈ KEYBINDS SETTINGS
====================================================================================================
]]--
Config.Keybinds = {
OpenChat = 245, -- Normally it is the "T" -> https://docs.fivem.net/docs/game-references/controls/
ChangeVisibility = 182 -- Normally it is the "L" -> https://docs.fivem.net/docs/game-references/controls/
}
--[[
====================================================================================================
π¬ GENERAL CHAT SETTINGS
====================================================================================================
]]--
Config.ProximityCheck = 3.0 -- The distance from where they will read your messages if you set "Proximity = true,"
Config.Shortcuts = { 'anon', 'me', 'do', 'msg', 'twt', 'ooc', 'dice' } -- You can put all the Shortcuts you want, copy and paste
Config.ChatDisappearTimeout = 5000 -- The time it takes for the chat to disappear from the screen (in seconds)
Config.DefaultChatCommand = 'ooc' -- Default command when writing without any command prefix (e.g., 'ooc', 'me', 'do', etc.)
-- Staff Label Settings
Config.UseStaffLabel = true -- If you want a "STAFF" label to appear in front of the names of administrators when they write in chat
Config.StaffLabel = "STAFF" -- The text that will appear as staff label (default: "STAFF")
Config.StaffLabelColor = "#c96c00" -- The color of the staff label (default: orange)
-- Player ID Display
Config.ShowIdForAll = true -- If you set it to true, the ID will appear in all messages that people write, and everyone will see it. If you set it to false, only administrators will see the ID
--[[
====================================================================================================
π’ AUTO MESSAGES SYSTEM
====================================================================================================
]]--
Config.AutoMessages = { -- Automatic messages that will appear in the chat automatically at the time you set.
{
Interval = 300, -- Seconds between messages
Message = "Remember to read the rules"
},
{
Interval = 400, -- Seconds between messages
Message = "Don't forgot to recommend the server"
}
}
--[[
====================================================================================================
π POPUP SYSTEM SETTINGS
====================================================================================================
]]--
Config.PopUpCharAdd = 0.2 -- Time that will be added to the popup display time per character (in seconds)
Config.PopupDistance = 25 -- If you enable the head POPUP in any command, this will be the distance at which the POPUP will be visible. If you don't use it, forget about this
Config.DefaultPopupStyle = {
LabelBoxContainer = '0px 0px 10px rgba(255, 255, 255, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(150, 150, 150, 0.196) 0%, rgba(96, 94, 94, 0.248) 99.18%)',
LabelBoxBorder = '1px solid rgba(179, 179, 179, 0.4)'
}
-- Performance Settings
Config.PopupUpdateInterval = 50 -- Interval in milliseconds for popup position updates (lower = smoother but more CPU usage)
Config.PopupMinDuration = 2000 -- Minimum popup display duration in milliseconds
Config.PopupCleanupInterval = 1000 -- Interval in milliseconds for cleaning expired popups
--[[
====================================================================================================
π‘οΈ MODERATION & FILTERS
====================================================================================================
]]--
-- Word Blacklist System
Config.UseWordsBlacklist = true -- If you set it to true, there will be a list of prohibited words, and anyone using one of these words will be muted
Config.BlacklistTimeout = 300 -- The duration of the mute that will be applied to each player who uses a bad word
Config.WordsBlacklist = { -- You can add as many words as you want
"badword", "flameword", "toxicword"
}
-- Long Message Filter
Config.LongMessageMute = true -- If you set this to true, it will automatically mute people who write messages that are too long. Designed to prevent TROLLS or SPAM
Config.LongMessageTimeout = 5 -- The muted time of the offender
Config.LongMessageMaxLength = 30 -- The words that will be considered "too long"
-- Spam Protection
Config.SpamMessageMute = true -- If they put too many chats in a row, they can be muted by SPAM
Config.SpamMessageTimeout = 5 -- The muted time of the offender
Config.SpamMessageInSeconds = 5 -- Time window for spam detection
Config.SpamMessageMaxCount = 5 -- Maximum messages allowed in time window before mute
-- Link Blocking
Config.BlockSendingLinks = true -- If you set it to true, people won't be able to send links.
Config.LinkMute = true -- If you set it to true, people who try to send links will be muted automatically
Config.LinkTimeout = 10 -- The muted time for sending links
--[[
====================================================================================================
π² DICE COMMAND
====================================================================================================
]]--
Config.DiceCommand = {
MaxDefaultValue = 100, -- Default maximum value when no number is specified
MaxAllowedValue = 1000, -- Maximum number allowed to prevent abuse
MessageTemplate = '<span style="display: inline-block; animation: diceRoll 0.8s ease-out; font-size: 1.4em; margin-right: 8px;">π²</span> <strong style="color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,0.7);">%s</strong> rolled a <span style="font-size: 1.3em; font-weight: bold; color: #ffffff; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); margin: 0 3px;">%d</span> out of <span style="font-weight: bold; color: #fff; font-size: 1.1em;">%d</span>!' -- Enhanced message template with properly sized result number
}
--[[
====================================================================================================
π¨ THEME SETTINGS
====================================================================================================
]]--
Config.DefaultTheme = {
background = "#808080", -- Default background color (gray)
accent = "#31afd4" -- Default accent color (blue)
}
--[[
====================================================================================================
π¨ SYSTEM MESSAGES
====================================================================================================
]]--
Config.Messages = {
-- Message Types with Styles
error = {
style = "background: linear-gradient(145deg, rgba(220, 53, 69, 0.25), rgba(200, 35, 51, 0.30)); border: 1px solid rgba(220, 53, 69, 0.4); box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);",
icon = "β"
},
success = {
style = "background: linear-gradient(145deg, rgba(40, 167, 69, 0.25), rgba(25, 135, 84, 0.30)); border: 1px solid rgba(40, 167, 69, 0.4); box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);",
icon = "β
"
},
info = {
style = "background: linear-gradient(145deg, rgba(13, 110, 253, 0.25), rgba(10, 88, 202, 0.30)); border: 1px solid rgba(13, 110, 253, 0.4); box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);",
icon = "βΉοΈ"
},
warning = {
style = "background: linear-gradient(145deg, rgba(255, 193, 7, 0.25), rgba(255, 176, 0, 0.30)); border: 1px solid rgba(255, 193, 7, 0.4); box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);",
icon = "β οΈ"
},
-- Specific messages
player_not_found = "Player with that ID not found!",
message_cannot_be_empty = "Message cannot be empty!",
message_sent_successfully = "Message sent successfully!",
provide_valid_player_id = "Please provide a valid player ID!",
no_permission = "You don't have permission to use this command",
player_already_muted = "This player is already muted",
missing_player_id = "Missing player of that ID",
player_muted_successfully = "You have successfully muted the player",
you_are_no_longer_muted = "You are no longer muted",
invalid_data = "Invalid data",
invalid_message = "Invalid message",
invalid_command = "Invalid command",
empty_message = "Empty message",
message_too_long = "Message too long",
sending_links_forbidden = "Sending links is forbidden!",
you_are_muted = "You are muted. You have %s seconds left.",
wrong_parameters = "Wrong parameters",
admin_muted_you = "Admin has muted you",
error_sending_message = "An error occurred while sending the message",
no_job_permission = "You don't have the required job to use this command",
command_executed = "Command executed successfully",
blacklisted_word_used = "You used a prohibited word and have been muted!",
player_unmuted_successfully = "You have successfully unmuted the player",
player_not_muted = "This player is not muted",
player_unmuted_by_admin = "You have been unmuted by an admin",
job_message_sent = "Message sent to %d %s member(s)",
no_job_members_found = "No online %s members found",
job_message_format_error = "Please specify a job name (e.g., police Hello everyone!)",
job_group_message_template = "π’ [GROUP MESSAGE to all %s members from %s]: %s",
}
--[[
====================================================================================================
π UI TRANSLATIONS
====================================================================================================
]]--
Config.UITranslations = {
-- Main Chat Interface
placeholder = "Write a text...",
sendButton = "SEND",
emojisTitle = "π Emojis",
-- Settings Menu
settingsTitle = "CHAT CONFIGURATION",
chatPosition = "- Chat Position",
chatSize = "- Chat Size",
chatBackground = "- Chat Background",
chatVisibility = "- Chat Visibility",
chatTheme = "- Chat Theme",
-- Position Options
leftUp = "Left UP",
rightUp = "Right UP",
leftDown = "Left DOWN",
rightDown = "Right DOWN",
-- Background Options
yes = "YES",
no = "NO",
-- Visibility Options
visible = "VISIBLE",
onInput = "ON INPUT",
hidden = "HIDDEN"
}
--[[
====================================================================================================
π SPANISH TRANSLATION EXAMPLE
====================================================================================================
If you want to translate the interface to Spanish, replace the Config.UITranslations section above with:
Config.UITranslations = {
-- Main Chat Interface
placeholder = "Escribe un texto...",
sendButton = "ENVIAR",
emojisTitle = "π Emojis",
-- Settings Menu
settingsTitle = "CONFIGURACIΓN DEL CHAT",
chatPosition = "- PosiciΓ³n del Chat",
chatSize = "- TamaΓ±o del Chat",
chatBackground = "- Fondo del Chat",
chatVisibility = "- Visibilidad del Chat",
chatTheme = "- Tema del Chat",
-- Position Options
leftUp = "Izquierda ARRIBA",
rightUp = "Derecha ARRIBA",
leftDown = "Izquierda ABAJO",
rightDown = "Derecha ABAJO",
-- Background Options
yes = "SΓ",
no = "NO",
-- Visibility Options
visible = "VISIBLE",
onInput = "AL ESCRIBIR",
hidden = "OCULTO"
}
====================================================================================================
]]--
--[[
====================================================================================================
π¬ CHAT COMMANDS
====================================================================================================
]]--
Config.Commands = {
{
Command = 'anon',
Label = '<strong>ANON</strong>',
PlayerName = 'None', -- RP / Steam / None / Anonymous
Params = { { name = 'text', help = 'Anonymous message' } },
Style = {
Background = 'linear-gradient(270deg, rgba(0, 0, 0, 0.136) 0%, rgba(0, 0, 0, 0.4) 99.18%)',
Border = '1px solid rgba(0, 0, 0, 0.18)',
LabelBoxContainer = '0px 0px 10px rgba(250, 250, 250, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(0, 0, 0, 0.4)'
},
Help = {
Title = 'Anonymous',
Subtitle = 'The message you would like to send as anonymous'
}
},
{
Command = 'me',
Label = '<strong>ME</strong>',
Proximity = true,
ShowPopUp = true,
Params = { { name = 'text', help = 'Action / description' } },
Style = {
LabelBoxContainer = '0px 0px 10px rgba(255, 194, 122, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(255, 168, 0, 0) 0%, rgba(255, 168, 0, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(255, 168, 0, 0.4)'
},
Help = {
Title = 'Message',
Subtitle = 'The message you would like to send as a me'
}
},
{
Command = 'do',
Label = '<strong>DO</strong>',
Proximity = true,
ShowPopUp = true,
Params = { { name = 'text', help = 'Environment description' } },
Style = {
LabelBoxContainer = '0px 0px 10px rgba(0, 194, 255, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(0, 179, 255, 0) 0%, rgba(0, 209, 255, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(0, 209, 255, 0.4)'
},
Help = {
Title = 'Message',
Subtitle = 'The message you would like to send as a do'
}
},
{
Command = 'sheriff',
Label = '<strong>BCSD</strong>',
Role = 'BCSD',
PlayerName = 'RP', -- RP / Steam / None / Anonymous
Params = { { name = 'text', help = 'Sheriff communication' } },
Style = {
AuthorColor = '#d97706',
Background = 'linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(245, 158, 11, 0.25) 50%, rgba(254, 243, 199, 0.15) 100%)',
Border = '1px solid rgba(245, 158, 11, 0.4)',
BoxShadow = '0 8px 32px rgba(217, 119, 6, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1)',
LabelBoxContainer = '0px 0px 15px rgba(245, 158, 11, 0.5)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(217, 119, 6, 0.8) 0%, rgba(245, 158, 11, 0.6) 100%)',
LabelBoxBorder = '1px solid rgba(254, 243, 199, 0.6)',
LabelBoxShadow = '0 4px 16px rgba(217, 119, 6, 0.4)'
},
Help = {
Title = 'Sheriff Alert',
Subtitle = 'County sheriff communication'
}
},
{
Command = 'police',
Label = 'π <strong>L.S.P.D.</strong>',
Role = 'LSPD',
PlayerName = 'None', -- RP / Steam / None / Anonymous
Params = { { name = 'text', help = 'Police communication' } },
JobCheck = {
Global = true,
Jobs = { 'police' }
},
Style = {
AuthorColor = '#1e40af',
Background = 'linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(59, 130, 246, 0.25) 50%, rgba(147, 197, 253, 0.15) 100%)',
Border = '1px solid rgba(59, 130, 246, 0.4)',
BoxShadow = '0 8px 32px rgba(30, 64, 175, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1)',
LabelBoxContainer = '0px 0px 15px rgba(59, 130, 246, 0.5)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(30, 64, 175, 0.8) 0%, rgba(59, 130, 246, 0.6) 100%)',
LabelBoxBorder = '1px solid rgba(147, 197, 253, 0.6)',
LabelBoxShadow = '0 4px 16px rgba(30, 64, 175, 0.4)'
},
Help = {
Title = 'L.S.P.D Alert',
Subtitle = 'Official police communication'
}
},
{
Command = 'ems',
Label = 'π <strong>E.M.S.</strong>',
Role = 'EMS',
PlayerName = 'None', -- RP / Steam / None / Anonymous
Params = { { name = 'text', help = 'Medical communication' } },
JobCheck = {
Global = true,
Jobs = { 'ambulance' }
},
Style = {
AuthorColor = '#dc2626',
Background = 'linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(248, 113, 113, 0.25) 50%, rgba(254, 202, 202, 0.15) 100%)',
Border = '1px solid rgba(248, 113, 113, 0.4)',
BoxShadow = '0 8px 32px rgba(220, 38, 38, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1)',
LabelBoxContainer = '0px 0px 15px rgba(248, 113, 113, 0.5)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(220, 38, 38, 0.8) 0%, rgba(248, 113, 113, 0.6) 100%)',
LabelBoxBorder = '1px solid rgba(254, 202, 202, 0.6)',
LabelBoxShadow = '0 4px 16px rgba(220, 38, 38, 0.4)'
},
Help = {
Title = 'E.M.S Alert',
Subtitle = 'Emergency medical services'
}
},
{
Command = 'taxi',
Label = 'π <strong>TAXI</strong>',
Role = 'Taxi',
PlayerName = 'None', -- RP / Steam / None / Anonymous
Params = { { name = 'text', help = 'Taxi communication' } },
JobCheck = {
Global = true,
Jobs = { 'taxi' }
},
Style = {
AuthorColor = '#eab308',
Background = 'linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(250, 204, 21, 0.25) 50%, rgba(254, 240, 138, 0.15) 100%)',
Border = '1px solid rgba(250, 204, 21, 0.4)',
BoxShadow = '0 6px 24px rgba(234, 179, 8, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1)',
LabelBoxContainer = '0px 0px 12px rgba(250, 204, 21, 0.4)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(234, 179, 8, 0.75) 0%, rgba(250, 204, 21, 0.55) 100%)',
LabelBoxBorder = '1px solid rgba(254, 240, 138, 0.5)',
LabelBoxShadow = '0 3px 12px rgba(234, 179, 8, 0.3)'
},
Help = {
Title = 'Taxi Service',
Subtitle = 'Taxi driver communication'
}
},
{
Command = 'mechanic',
Label = 'π§ <strong>MECHANIC</strong>',
Role = 'Mechanic',
PlayerName = 'None', -- RP / Steam / None / Anonymous
Params = { { name = 'text', help = 'Mechanic communication' } },
JobCheck = {
Global = true,
Jobs = { 'mechanic' }
},
Style = {
AuthorColor = '#059669',
Background = 'linear-gradient(135deg, rgba(5, 150, 105, 0.15) 0%, rgba(16, 185, 129, 0.25) 50%, rgba(167, 243, 208, 0.15) 100%)',
Border = '1px solid rgba(16, 185, 129, 0.4)',
BoxShadow = '0 6px 24px rgba(5, 150, 105, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1)',
LabelBoxContainer = '0px 0px 12px rgba(16, 185, 129, 0.4)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(5, 150, 105, 0.75) 0%, rgba(16, 185, 129, 0.55) 100%)',
LabelBoxBorder = '1px solid rgba(167, 243, 208, 0.5)',
LabelBoxShadow = '0 3px 12px rgba(5, 150, 105, 0.3)'
},
Help = {
Title = 'Mechanic Service',
Subtitle = 'Mechanic workshop communication'
}
},
{
Command = '311',
Label = 'π¨ <strong>311</strong>',
Role = '311',
PlayerName = 'RP', -- RP / Steam / None / Anonymous
Params = { { name = 'text', help = 'Emergency coordination message' } },
JobCheck = {
Global = false, -- Only specific jobs can see this chat
Jobs = { 'police', 'ambulance' } -- Multiple jobs allowed
},
Style = {
AuthorColor = '#ea580c',
Background = 'linear-gradient(135deg, rgba(234, 88, 12, 0.15) 0%, rgba(249, 115, 22, 0.25) 50%, rgba(254, 215, 170, 0.15) 100%)',
Border = '1px solid rgba(249, 115, 22, 0.4)',
BoxShadow = '0 8px 32px rgba(234, 88, 12, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1)',
LabelBoxContainer = '0px 0px 15px rgba(249, 115, 22, 0.5)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(234, 88, 12, 0.8) 0%, rgba(249, 115, 22, 0.6) 100%)',
LabelBoxBorder = '1px solid rgba(254, 215, 170, 0.6)',
LabelBoxShadow = '0 4px 16px rgba(234, 88, 12, 0.4)'
},
Help = {
Title = '311 Emergency',
Subtitle = 'Emergency services coordination'
}
},
{
Command = 'msg',
Label = 'Private <strong>message</strong>',
Params = { { name = 'player id', help = 'Target player ID' }, { name = 'text', help = 'Private message' } },
Style = {
Background = 'linear-gradient(270deg, rgba(189, 0, 255, 0.196) 0%, rgba(96, 94, 94, 0.248) 99.18%)',
Border = '1px solid rgba(219, 0, 255, 0.34)',
LabelBoxContainer = '0px 0px 10px rgba(219, 0, 255, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(158, 0, 255, 0) 0%, rgba(158, 0, 255, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(235, 0, 255, 0.4)'
},
Help = {
Title = 'Private Message',
Subtitle = 'The message you would like to send as private'
}
},
{
Command = 'jobmsg',
Label = '<strong>JOBMSG</strong>',
Params = { { name = 'job', help = 'Target job name' }, { name = 'text', help = 'Message to send' } },
Style = {
AuthorColor = '#7c3aed',
Background = 'linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(168, 85, 247, 0.25) 50%, rgba(221, 214, 254, 0.15) 100%)',
Border = '1px solid rgba(168, 85, 247, 0.4)',
BoxShadow = '0 8px 32px rgba(124, 58, 237, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1)',
LabelBoxContainer = '0px 0px 15px rgba(168, 85, 247, 0.5)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(124, 58, 237, 0.8) 0%, rgba(168, 85, 247, 0.6) 100%)',
LabelBoxBorder = '1px solid rgba(221, 214, 254, 0.6)',
LabelBoxShadow = '0 4px 16px rgba(124, 58, 237, 0.4)'
},
Help = {
Title = 'Group Message',
Subtitle = 'Send message to all members of a job (e.g., police Hello team!)'
}
},
{
Command = 'twt',
Label = 'π¦ <strong>TWT</strong>',
Params = { { name = 'text', help = 'Tweet content' } },
Style = {
LabelBoxContainer = '0px 0px 10px rgba(0, 194, 255, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(0, 179, 255, 0) 0%, rgba(0, 209, 255, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(0, 209, 255, 0.4)'
},
Help = {
Title = 'Twitter',
Subtitle = 'The message you would like to send a tweet'
}
},
{
Command = 'announce',
Label = '<strong>Announce</strong>',
Role = 'Server',
AdminOnly = true,
Params = { { name = 'text', help = 'Announcement text' } },
AdminCheck = {
Global = true,
Ranks = { 'god', 'superadmin' }
},
Style = {
Background = 'linear-gradient(270deg, rgba(182, 255, 148, 0.216) 0%, rgba(96, 94, 94, 0.248) 99.18%)',
Border = '1px solid #b6ff94',
AuthorColor = '#b6ff94',
LabelBoxContainer = '0px 0px 10px rgba(182, 255, 148, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(182, 255, 148, 0) 0%, rgba(182, 255, 148, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(182, 255, 148, 0.4)'
},
Help = {
Title = 'Global',
Subtitle = 'The message you would like to send as globally'
}
},
{
Command = 'ooc',
Label = '<strong>OOC</strong>',
JobLabel = true,
ColorJobLabel = 'black',
Params = { { name = 'text', help = 'Out-of-character message' } },
Style = {
LabelBoxContainer = '0px 0px 10px rgba(255, 255, 255, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(139, 139, 139, 0) 0%, rgba(128, 128, 128, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(143, 143, 143, 0.4)'
},
Help = {
Title = 'Global',
Subtitle = 'The message you would like to send as globally'
}
},
{
Command = 'jobm',
Label = 'πΌ <strong>JOB</strong>',
Params = { { name = 'text', help = 'Job wide message' } },
Role = 'Job',
Style = {
AuthorColor = '#6366f1',
Background = 'linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.20) 50%, rgba(196, 181, 253, 0.12) 100%)',
Border = '1px solid rgba(139, 92, 246, 0.35)',
BoxShadow = '0 6px 24px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08)',
LabelBoxContainer = '0px 0px 12px rgba(139, 92, 246, 0.4)',
LabelBoxBackground = 'linear-gradient(135deg, rgba(99, 102, 241, 0.75) 0%, rgba(139, 92, 246, 0.55) 100%)',
LabelBoxBorder = '1px solid rgba(196, 181, 253, 0.5)',
LabelBoxShadow = '0 3px 12px rgba(99, 102, 241, 0.3)'
},
Help = {
Title = 'Job Message',
Subtitle = 'Official job communication'
}
},
{
Command = 'trade',
Label = '<strong>TRADE</strong>',
Params = { { name = 'text', help = 'Trade offer' } },
Style = {
LabelBoxContainer = '0px 0px 10px rgba(128, 255, 0, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(189, 255, 0, 0) 0%, rgba(128, 255, 0, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(158, 255, 0, 0.4)'
},
Help = {
Title = 'Warning Trade',
Subtitle = 'The message you would like to send a trade'
}
},
{
Command = 'adminchat',
Label = '<strong>ADMIN CHAT</strong>',
PlayerName = 'RP',
Params = { { name = 'text', help = 'Staff chat message' } },
Proximity = false,
Style = {
Background = 'linear-gradient(270deg, rgba(189, 0, 255, 0.196) 0%, rgba(96, 94, 94, 0.248) 99.18%)',
Border = '1px solid rgba(219, 0, 255, 0.34)',
LabelBoxContainer = '0px 0px 10px rgba(219, 0, 255, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(158, 0, 255, 0) 0%, rgba(158, 0, 255, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(235, 0, 255, 0.4)'
},
AdminOnly = true,
AdminCheck = {
Global = false,
Ranks = { 'god', 'superadmin' }
},
Help = {
Title = 'STAFF Chat',
Subtitle = 'Internal Staff Chat. Only the Staff will read it'
}
},
{
Command = 'dice',
Label = 'π² <strong>DICE</strong>',
PlayerName = 'RP',
Proximity = true,
ShowPopUp = false,
Style = {
Background = 'linear-gradient(270deg, rgba(255, 215, 0, 0.196) 0%, rgba(96, 94, 94, 0.248) 99.18%)',
Border = '1px solid rgba(255, 215, 0, 0.34)',
AuthorColor = '#ffd700',
LabelBoxContainer = '0px 0px 10px rgba(255, 215, 0, 0.4)',
LabelBoxBackground = 'linear-gradient(270deg, rgba(255, 215, 0, 0) 0%, rgba(255, 215, 0, 0.228) 46.31%)',
LabelBoxBorder = '1px solid rgba(255, 215, 0, 0.4)'
},
Help = {
Title = 'Dice Roll',
Subtitle = 'Roll a dice with specified maximum value [max number]'
},
Params = {
{ name = 'max number', help = 'Maximum dice value (default '..Config.DiceCommand.MaxDefaultValue..')' }
}
},
}
--[[
====================================================================================================
π COMMAND CONFIGURATION GUIDE
====================================================================================================
Below is a complete example showing ALL available variables for creating custom commands.
Copy this template and modify it for your own commands:
{
Command = 'example', -- The command name (without slash)
Label = '<strong>EXAMPLE</strong>', -- Text shown in the chat label/tag
Role = 'Example Role', -- Role name shown (optional)
-- PLAYER NAME OPTIONS:
PlayerName = 'RP', -- How to display sender name:
-- 'RP' = Character name (John Doe)
-- 'Steam' = Steam username
-- 'None' = No name (completely anonymous)
-- 'Anonymous' = Shows "Anonymous ID: 123"
-- PROXIMITY OPTIONS:
Proximity = true, -- If true, only nearby players see the message
-- POPUP OPTIONS:
ShowPopUp = true, -- If true, shows popup above player's head
-- JOB RESTRICTIONS:
JobCheck = {
Global = false, -- If true, everyone sees it regardless of job
-- If false, only specified jobs can see it
Jobs = { 'police', 'ambulance' } -- Array of job names that can use/see this command
},
-- ADMIN RESTRICTIONS:
AdminOnly = true, -- If true, only admins can use this command
AdminCheck = {
Global = false, -- If true, everyone sees admin messages
-- If false, only admins with specified ranks see it
Ranks = { 'god', 'superadmin' } -- Array of admin ranks that can use/see this
},
-- JOB LABEL OPTIONS:
JobLabel = true, -- If true, shows player's job in the message
ColorJobLabel = 'black', -- Color for the job label text
-- VISUAL STYLING:
Style = {
-- MESSAGE CONTAINER STYLING:
Background = 'linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.25) 50%, rgba(196, 181, 253, 0.15) 100%)',
Border = '1px solid rgba(139, 92, 246, 0.35)',
BoxShadow = '0 6px 24px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08)',
-- AUTHOR NAME STYLING:
AuthorColor = '#6366f1', -- Color of the player name text
-- LABEL BOX STYLING (the command tag/label):
LabelBoxContainer = '0px 0px 12px rgba(139, 92, 246, 0.4)', -- Shadow around label
LabelBoxBackground = 'linear-gradient(135deg, rgba(99, 102, 241, 0.75) 0%, rgba(139, 92, 246, 0.55) 100%)',
LabelBoxBorder = '1px solid rgba(196, 181, 253, 0.5)', -- Label border
LabelBoxShadow = '0 3px 12px rgba(99, 102, 241, 0.3)' -- Label shadow
},
-- HELP TEXT (shown in command suggestions):
Help = {
Title = 'Example Command', -- Short title for the command
Subtitle = 'Description of what this command does' -- Longer description
}
},
NOTE: You can mix and match these options. Not all variables are required.
Common combinations:
- Basic global command: Just Command, Label, Style, Help
- Job-only command: Add JobCheck with Global=false and specific Jobs
- Admin command: Add AdminOnly=true or AdminCheck
- Proximity command: Add Proximity=true for local area only
- Anonymous command: Add PlayerName='None' for no sender name
====================================================================================================
]]--
If you want to edit the aesthetics or design. You have the HTML open so you can modify the style and everything as you want.
The script is RESPONSIVE for all resolutions as well.
Last updated