Configuration
This showcases and explains the config.lua file within the SAMP RP Chat!
Config = {}
Config.Locale = "en"
--------------------------------------------
----------------- DS LOGS ------------------
--------------------------------------------
Config.EnableServerLog = false
---------------------------------------------
----------------- CHAT CMD ------------------
---------------------------------------------
Config.Commands = {
["s"] = { distance = "speak", extender = "says" },
["g"] = { distance = "shout", extender = "shouts" },
["l"] = { distance = "whisper", extender = "whispers" }
}
Config.Distances = {
["speak"] = 5,
["shout"] = 25,
["whisper"] = 2,
["me"] = 8,
["melow"] = 3,
["melong"] = 15,
["ame"] = 8,
["do"] = 10,
["dolow"] = 3,
["dolong"] = 20,
["ooc"] = 10,
}
Config.AmeInChat = false -- send the message also in chat
Config.StoCmd = "sto"
Config.LtoCmd = "lto"
Config.SHtoCmd = "gto"
Config.Phone = true --- true: command ON | false: use /p from brr-phone
---------------------------------------------
---------------- ADV PERMS ------------------
---------------------------------------------
Config.ConfigADVJob = {
['unicorn'] = "VANILLA UNICORN",
['tequilala'] = "TEQUI-LA-LA",
['burgershot'] = "BURGERSHOT",
['mechanic'] = "BENNY'S MOTORS",
-- add more job here...
}
Config.ADVoxNotify = true -- false send chat message
Config.ADVbrrNotify = true -- use brr-notify
Config.NewsJob = "weazel"
Config.NewsOxNotify = false -- false send chat message
Config.NewsBrrNotify = true -- use brr-notify
---------------------------------------------
------------- LEO/EMS ADV PERMS --------------
---------------------------------------------
Config.LEOjobs = {
['police'] = {
prefix = "LSPD"
},
['sheriff'] = {
prefix = "LSSD"
}
}
Config.RESCUEjobs = {
['ambulance'] = {
prefix = "EMS"
},
['lsfd'] = {
prefix = "LSFD"
}
}
Config.DISPATCHjobs = { 'police', 'ambulance', 'sheriff' }
---------------------------------------------
-------------- REPORT PERMS -----------------
---------------------------------------------
Config.Report = {
Groups = {
"mod",
"admin",
"leadadmin",
"management",
"owner"
},
}
---------------------------------------------
--------------- RADIO PERMS -----------------
---------------------------------------------
Config.RadioPerms = {
[1] = {"sheriff", "ambulance"}, -- police and ambulance
[2] = {"sheriff"}, -- police only
[3] = {"sheriff"}, -- police only
[4] = {"sheriff"}, -- police only
[5] = {"sheriff"}, -- police only
[6] = {"sheriff"}, -- police only
[7] = {"sheriff"}, -- police only
[8] = {"sheriff"}, -- police only
[9] = {"sheriff"}, -- police only
[10] = {"sheriff"}, -- police only
[11] = {"sheriff"}, -- police only
[12] = {"sheriff"}, -- police only
[13] = {"ambulance"}, -- ambulance only
[14] = {"ambulance"}, -- ambulance only
[15] = {"ambulance"}, -- ambulance only
[16] = {"ambulance"}, -- ambulance only
[17] = {"ambulance"}, -- ambulance only
}
---------------------------------------------
----------------- NAME TAGS -----------------
---------------------------------------------
function output(text, target)
if IsDuplicityVersion() then
TriggerClientEvent("chat:addMessage", target or -1, {
color = { 255, 0, 0 },
multiline = true,
args = { "Server", text },
})
else
TriggerEvent("chat:addMessage", {
color = { 255, 0, 0 },
multiline = true,
args = { "Server", text },
})
end
end
Config.Distance = 10
Config.NoMaskFemale = {
244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 288, 289,
290, 291, 293, 294, 295, 296, 297, 298, 299, 301, 302, 303, 304, 305, 306,
307, 309, 310, 311, 312, 313, 315, 316, 317, 318, 319, 320, 323, 326, 327,
328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
343, 344, 345, 346, 347, 349, 351, 352, 354, 355, 357, 358, 359, 360, 361,
362, 363, 364
}
Config.NoMaskMale = {
242, 245, 251, 253, 254, 255, 261, 264, 265, 271, 272, 273, 277, 278, 279,
280, 281, 282, 285, 286, 287, 288, 289, 290, 294, 295, 301, 302, 308, 310,
311, 316, 320, 323, 324, 325, 329, 330, 331, 334, 335, 337, 342, 344, 345,
346, 347, 348, 349, 350, 351, 352, 353, 354, 355
}
Config.AdminLabels = true
Config.AdminColor = "#7cc576"
Config.AdminGroups = {
['mod'] = 'Mod',
['admin'] = 'Admin',
['leadadmin'] = 'Lead Admin',
['management'] = 'Management',
['owner'] = 'Owner'
}
Config.AdminLang = {
NoPermission = "You do not have Admin permissions to use this command.",
AdminOnDuty = "You have entered duty as Admin.",
AdminOffDuty = "You are no longer on duty as Admin"
}
----------------------------------------
----------------- /911 -----------------
----------------------------------------
Config.AuthorizedJobs = {
police = true,
ambulance = true,
-- add more job here
}
Config.BlipTime911 = 180 -- The amount of time the circle will stay on your map in seconds!
Config.BlipRadius911 = 175.0 -- Change this to change the radius of how big you want the 911 circle to be!
Config.CallBlip911 = false -- If you change this to "false", it will turn off the circle that is created when you use the /911 command
Config.CallChat911 = false -- If you change this to "false", it will turn off chat calls!
---------------------------------------------
----------------- COOLDOWNS -----------------
---------------------------------------------
Config.GiveItemCooldown = 2000 -- Cooldown in milliseconds for giving items (prevents spam)
Config.DropPickupCooldown = 2000 -- Cooldown in milliseconds for dropping/picking up items
---------------------------------------------
----------------- CHAT SIZE -----------------
---------------------------------------------
Config.ChatSizeMin = 0.5 -- Minimum chat size multiplier
Config.ChatSizeMax = 2.0 -- Maximum chat size multiplier
Config.ChatSizeDefault = 1.0 -- Default chat size multiplier
---------------------------------------------
----------------- TYPING INDICATOR ----------
---------------------------------------------
Config.TypingIndicatorEnabled = false -- Default state for typing indicator (true = ON, false = OFF)
Config.TypingIndicatorRange = 10.0 -- Range in units to show typing indicator
Config.TypingIndicatorTimeout = 30000 -- Timeout in milliseconds (30 seconds) to auto-stop typing indicator
---------------------------------------------
----------------- TIMESTAMPS ----------------
---------------------------------------------
Config.TimestampsEnabled = false -- Default state for timestamps (true = ON, false = OFF)
Config.TimestampFormat = "[%02d:%02d:%02d]" -- Timestamp format (uses os.date format)
---------------------------------------------
----------------- MASK SYSTEM --------------
---------------------------------------------
Config.MaskCheckInterval = 500 -- Interval in milliseconds to check mask status
Config.MaskCheckRange = 50.0 -- Range in units to check other players' masks
Config.StrangerName = "Stranger" -- Name to show for masked players in roleplay commands
---------------------------------------------
----------------- DAMAGE SYSTEM -------------
---------------------------------------------
Config.DamageHistoryLimit = 8 -- Maximum number of damage entries to store per player
Config.DamageShowDistance = true -- Show distance in damage messages
Config.DamageShowTime = true -- Show time in damage messages
---------------------------------------------
----------------- ADVERT SYSTEM -------------
---------------------------------------------
Config.AdvertCost = 1000 -- Cost in dollars to place an advertisement
Config.AdvertDelay = 30000 -- Delay in milliseconds between advertisements (30 seconds)
---------------------------------------------
----------------- NUMBER CONVERSION ---------
---------------------------------------------
Config.ConvertNumbersToWords = true -- Convert numbers (0-99) to words in /ame messages
Config.NumberConversionMin = 0 -- Minimum number to convert
Config.NumberConversionMax = 99 -- Maximum number to convert
Config.ExcludeWeaponsFromConversion = true -- Don't convert numbers in weapon names
---------------------------------------------
----------------- INVALID COMMAND -----------
---------------------------------------------
Config.InvalidCommandNotify = true -- Show ox_lib notification for invalid commands
Config.InvalidCommandChatMessage = true -- Show chat message for invalid commands
-- =========================== --
-- ========= LOCALES ========= --
-- =========================== --
Locales = {}
Locales['en'] = {
--- Autogrammar
autogrammar = "ag", --- name of the command
agon = "^2ON",
agoff = "^1OFF",
agnotify = "^4[!] ^0Autogrammar: ",
--- General
missingargs = "You have not entered the text.",
notjob = "You do not have the required job to use this command.",
--- Radio System
notvalidmhz = "[RADIO]: Invalid frequency number. Must be 1 to 100.",
validmhz = "[RADIO ON]: You are connected to the radio frequency: %d.00 Mhz.",
notvalidfreq = "[RADIO]: Invalid frequency number.",
noitem = "[RADIO]: You don't have a radio in your inventory.",
disconnected = "[RADIO OFF]: You have disconnected from the radio frequency.",
speakinradio = "[RADIO %s.00 Mhz]: %s says: %s",
notconnected = "[RADIO OFF]: You are not connected to any radio frequency.",
radiotooshort = "[RADIO]: Message empty or too short.",
speakinradio = "[RADIO %.2f Mhz] %s says: %s",
speakinradioTwo = " says (radio): ",
--- /try strings
trySuccess = '<span style="color: orange">successfully.</span>',
tryFail = '<span style="color: orange">but it fails.</span>',
messageTemplate = '<div style="text-stroke: 0.1vw solid #000;"><span style="color: rgb(194,162,218);">* %s try to %s %s</span></div>',
messageTemplateLogs = '%s try to %s %s',
trySuccessLogs = 'successfully.',
tryFailLogs = 'but it fails.',
--- /news
usagenotifynews = "^4[!] ^0Usage: ^4/news^0 [message]^0",
prefixnews = "[WEAZEL NEWS]: ",
--- /adv
prefixadv = "[ADV]: ",
prefixems = "[EMS ADV]: ",
--- /flipcoin
flipcoinResultHead = '<span style="color: orange">head</span>',
flipcoinResultTail = '<span style="color: orange">tail</span>',
flipcoinMessageTemplate = '<div style="text-stroke: 0.1vw solid #000;"><span style="color: rgb(194,162,218);">* %s toss a coin and it comes out %s</span></div>',
--- /says
dice1 = " throw the dice and it comes out ",
dice2 = " throws two dice and comes out ",
dice3 = " throws three dice and comes out ",
--- /dart
dartinfoTitle = "~b~[DARTS]~w~ - ",
dartinfoText = " The target is divided into ~g~20 sectors ~w~. The numbers on the edge ~g~(from 1 to 20)~w~ indicate the value of the respective sectors, ~g~the outer ring doubles~w~ the points of the sector, ~g~the inner ring triples~w~ the points of the sector. The center of the target is worth ~g~50 points~w~ and the ring around the center is ~g~25 points~w~. The highest score in the target is the ~g~''triple twenty''~w~. When a player scores more than the remaining score, failing to reach exactly zero, it is counted as ~r~MISSING~w~, resetting the score from the player's last turn. The starting score is ~b~501~w~.",
dart = " throw the dart hitting the ",
dartMultiply = " multiplied for ",
dart25a = " throw the dart hitting the green bull getting",
dart25b = " 25 points",
dart50a = " throw the dart hitting the bulleyes and getting ",
dart50b = " 50 points",
--- /pm
pmsend = "PM sent to ",
pmreceive = "PM received from ",
pmnotvalidid = "Invalid player ID.",
idnotconnected = "Player not connected.",
--- police cmds
dispatchprefix = "[DISPATCH]: ",
megaphoneprefix = "MEGAPHONE",
--- stats cmds
bankMessageTemplate = '<div style="text-stroke: 0.1vw solid #000;font-weight:bold"><span style="color: rgb(255,165,0)">[BANK]: <span style="color: rgb(255, 255, 255)">You currently have ^3$%s ^0in your bank account.</span></span></div>',
cashMessageTemplate = '<div style="text-stroke: 0.1vw solid #000;font-weight:bold"><span style="color: rgb(255,165,0)">[CASH]: <span style="color: rgb(255, 255, 255)">You currently have ^3$%s ^0in your wallet.</span></span></div>',
societyMessageTemplate = '<div style="text-stroke: 0.1vw solid #000;font-weight:bold"><span style="color: rgb(255,165,0)">[SOCIETY]: <span style="color: rgb(255, 255, 255)">You currently have ^3$%s ^0 in your business account.</span></span></div>',
societyErrorMessage = '<div style="text-stroke: 0.1vw solid #000;font-weight:bold"><span style="color: rgb(255,165,0)">[SOCIETY]: <span style="color: rgb(255, 255, 255)">Error retrieving business account.</span></span></div>',
societyNotFoundMessage = '<div style="text-stroke: 0.1vw solid #000;font-weight:bold"><span style="color: rgb(255,165,0)">[SOCIETY]: <span style="color: rgb(255, 255, 255)">You currently have ^3$0 ^0 in your business account.</span></span></div>',
unauthorizedAccessMessage = '<div style="text-stroke: 0.1vw solid #000;font-weight:bold"><span style="color: rgb(255,165,0)">[SOCIETY]: <span style="color: rgb(255, 255, 255)">^1[!] ^0Unauthorized access!</span></span></div>',
--- Text cmds
suggestionsto = "Correct usage: /sto + [ID] + [message]",
suggestionwto = "Correct usage: /wto + [ID] + [message]",
suggestiongto = "Correct usage: /gto + [ID] + [message]",
saysNormal = "%s says (to %s): %s",
whisperFormat = '%s says [low] (to %s): %s',
shoutFormat = '%s shouts (to %s): %s',
CarWhisper = "(Car) {name} whispers: {msg}",
NotInCarForWoB = "~r~[!]~w~ You must be in a vehicle to use this command.",
--- 911
SuggestionOne911 = "Call 911 for your emergency!",
SuggestionTwo911 = "Enter your report here!",
Queston911 = "What is the nature and location of your emergency?",
SuccessSend911 = "Call successfully sent to 911.",
Sv911MsgOne = "New 911 Report:",
SV911MsgTwo = "[CALLER NAME]: ",
SV911MsgThree = "[LOCATION]: ",
SV911MsgFour = "[REPORT]: ",
--- Phone cmd
speakPhone = " says (phone): ",
notInCall = "^1[ERROR] You are not in a call.",
notOtherInCall = "^1[ERROR] There is no one else in the call.",
--- Masked
MaskedName = "Masked_",
--- Whispers
InvalidIdWhisp = "[!] Invalid ID or player offline.",
InvalidMsgWhisp = "[!] Invalid message.",
WhispersText = " whispers to ",
Whisers3dText = " whispers to ",
--- cmds suggestions
SuggestionInsetMessage = "Enter the message you want to send.",
SuggestionInsertID = "Enter the ID of the player you want to talk to.",
SuggestionAG = "Toggle autogrammar ON/OFF",
SuggestionSAYone = "Make your character speak in text chat.",
SuggestionLOWone = "Make your character whisper in text chat.",
SuggestionSHOUTone = "Make your character shout in text chat.",
SuggestionSTOone = "Make your character speak referring to another player.",
SuggestionLTOone = "Make your character speak quietly referring to another player.",
SuggestionSHTOone = "Make your character shout referring to another player.",
SuggestionCash = "Check how much money you have in your pocket.",
SuggestionBank = "Check how much money you have in the bank.",
SuggestionSociety = "Check how much money your business has.",
SuggestionAME = "Personal action that does not interact with others.",
SuggestionME = "Personal action that does not interact with others.",
SuggestionMElow = "Personal action that interacts with others in a smaller range compared to /me.",
SuggestionMElong = "Personal action that interacts with others in a wider range compared to /me.",
SuggestionDO = "Used to enhance the scene by describing things you normally wouldn't see.",
SuggestionDolow = "Used to enhance the scene by describing things you normally wouldn't see in a smaller range compared to /do.",
SuggestionDolong = "Used to enhance the scene by describing things you normally wouldn't see in a wider range compared to /do.",
SuggestionFLIPCOIN = "Flip a coin.",
SuggestionDado = "Roll one die.",
SuggestionDadiDue = "Roll two dice.",
SuggestionDadiTre = "Roll three dice.",
SuggestionDART = "Throw a dart.",
SuggestionDARTinfo = "Read the dart rules.",
SuggestionADSbusiness = "Advertisement message for businesses.",
SuggestionADSpolice = "Message to citizens from the police.",
SuggestionADSambulance = "Message to citizens from EMS.",
SuggestionNEWS = "Send a news report from your news agency.",
SuggestionDP = "Dispatch for LAPD and Medics.",
SuggestionMEG = "Speak through the police megaphone.",
SuggestionRCON = "Command to connect to a radio frequency.",
SuggestionRCONdue = "Available frequencies from 1 to 100.\nDoes not support decimal frequencies.",
SuggestionRDISCON = "Command to disconnect from a radio frequency.",
SuggestionCmdR = "Command to talk via radio on the selected frequency using /rconnect.",
SuggestionInfoChat = "Display the list of all chat commands.",
SuggestiaTogNT = "Disable player name tags above heads.",
SuggestionSelfNT = "Disable the name tag above your own head.",
SuggestionPhoneCmd = "Command to speak via text chat on the phone.",
Suggestion911 = "Send a report to 911.",
SuggestionChatLog = "Open the chat log to copy your chat to the clipboard.",
SuggestionWhispers = "Whisper to a player.",
SuggestionWhispersCar = "Whisper to a player in the car.",
SuggestionOOC = "Send a local OOC (out-of-character) message.",
SuggestionOOCcar = "Send an OOC message in the car.",
--- Additional Commands
SuggestionAR = "Reply to a player report [Admin Only]",
SuggestionSC = "Send message in staff chat [Admin Only]",
SuggestionOOCCommand = "Send an out-of-character message",
SuggestionAnnounce = "Broadcast message to whole server [Admin Only]",
SuggestionAdvert = "Advertise to the whole server",
SuggestionDispatch = "Dispatch radio for police/ambulance",
SuggestionAdmins = "Show all active admins [Admin Only]",
SuggestionOnline = "Show online players count",
SuggestionGroup = "Show your group information",
SuggestionTimestamps = "Toggle timestamp display on chat messages",
SuggestionIndicator = "Toggle typing indicator on/off",
SuggestionFontsize = "Change chat size (0.5 - 2.0)",
SuggestionChatsize = "Change chat size (0.5 - 2.0)",
SuggestionDamages = "View your damage history",
SuggestionCDamages = "Clear your damage history",
SuggestionTogglePM = "Toggle receiving private messages",
SuggestionToggleReports = "Toggle receiving reports [Admin Only]",
SuggestionCls = "Clear the chat (just for you)",
SuggestionClsAll = "Clear the chat (for everyone) [Admin Only]",
--- Error Messages
ErrorPlayerNotFound = "Player not found.",
ErrorMessageEmpty = "Message cannot be empty.",
ErrorInvalidID = "Invalid player ID.",
ErrorPlayerOffline = "Player not connected.",
ErrorNoPermission = "You do not have permission to use this command.",
ErrorInvalidSize = "Invalid size. Please enter a number between %.2f and %.2f.",
ErrorUsageAR = "Usage: /ar [playerId] [message]",
ErrorUsageFontsize = "Usage: /fontsize <size> (%.2f - %.2f) or /chatsize <size>",
ErrorNoAdminduty = "You must be on admin duty to use staff chat. Use /adminduty to toggle.",
ErrorNoJob = "You don't have the required job.",
ErrorNoDamageHistory = "No damage history to display.",
ErrorNoDamageHistoryOther = "%s has no damage history.",
ErrorInvalidCommand = "Command /%s not found. Use /infochat to see all available commands.",
ErrorInvalidCommandTitle = "Invalid Command",
--- Success Messages
SuccessChatSize = "Chat size set to %.2f",
SuccessAdmindutyOn = "You have entered duty as Admin.",
SuccessAdmindutyOff = "You are no longer on duty as Admin.",
SuccessPMEnabled = "Private messages enabled.",
SuccessPMDisabled = "Private messages disabled.",
SuccessReportsEnabled = "Reports enabled.",
SuccessReportsDisabled = "Reports disabled.",
SuccessTimestampsOn = "Timestamps enabled.",
SuccessTimestampsOff = "Timestamps disabled.",
SuccessIndicatorOn = "Typing indicator enabled.",
SuccessIndicatorOff = "Typing indicator disabled.",
SuccessDamageHistoryCleared = "Damage history cleared.",
--- Report System
ReportReplyTo = "[Report Reply] Replied to %s [%d]: %s",
ReportReplyFrom = "[Report Reply] %s [%d] replied to your report: %s",
ReportNoAdmins = "No admins are currently online.",
ReportSent = "Report sent to online admins.",
--- Staff Chat
StaffChatFormat = "[Staff] %s [%d]: %s",
--- Announcement
AnnouncementFormat = "[Announcement] %s",
--- Dispatch
DispatchFormat = "[Dispatch] %s [%d]: %s",
--- Admins
AdminsList = "Active Admins [%d]: %s",
AdminsNone = "Active Admins [0]: None",
--- Online
OnlinePlayers = "There are %d/%d players online.",
--- Group
GroupFormat = "Your group: %s",
--- OOC
OOCFormat = "(( %s )): %s",
OOCFormatCar = "(( %s )) [Car]: %s",
--- Invalid Command
InvalidCommandNotify = "Command /%s not found. Use /infochat to see all available commands.",
--- Info Chat
InfoChatHeader = "═══════════════════════════════════════",
InfoChatTitle = "[!] CHAT COMMANDS",
InfoChatCategory = "[!] %s:",
InfoChatCommand = " • %s",
InfoChatFooter = "═══════════════════════════════════════",
--- ox_inventory /ame messages
AmeReachesForWeapon = "reaches for a %s.",
AmeGrabsItem = "grabs %s %s and uses it.",
AmePlacesItem = "places a/an %s on the ground.",
AmePlacesItems = "places (%s) %s on the ground.",
AmePicksUpItem = "picks up a/an %s from the ground.",
AmePicksUpItems = "picks up (%s) %s from the ground.",
AmeHandsItem = "hands a/an %s to %s.",
AmeHandsItems = "hands (%s) %s to %s.",
--- Mask System
MaskedName = "Masked_%d",
--- Stranger
StrangerName = "Stranger",
--- Unknown
UnknownPlayer = "Unknown",
UnknownWeapon = "Unknown Weapon",
UnknownBone = "Unknown",
--- Damage System
DamageShot = "You were shot with %s in the %s for %d damage.",
DamageDamaged = "You were damaged by %s in the %s for %d damage.",
DamageKilled = "You were killed by %s in the %s.",
DamageDistance = "Distance: %.2fm",
DamageTime = "Time: %s",
DamageFatal = "Fatal",
DamageHistoryHeader = "=== Damage History ===",
DamageHistoryHeaderOther = "=== %s's Damage History ===",
DamageEntry = "[%s] %s - %s - %d damage - %s",
--- Private Message
PMDisabled = "This player has private messages disabled.",
PMFormat = "PM from %s [%d]: %s",
PMFormatTo = "PM to %s [%d]: %s",
}
Config.Lang = Locales['en']
Last updated
