Commands Registration
๐ 311a
Command
311a
CommandSends an anonymous 311 message to EMS personnel. This is useful for citizens to contact EMS without revealing their identity.
๐ง Command Registration
lib.addCommand('311a', {
help = 'Send an anonymous message to 311',
params = {{
name = 'message',
type = 'string',
help = '311 Message'
}}
}, function(source, args, raw)
...
end)
๐ฅ Parameters
Name
Type
Required
Description
message
string
โ
The message content for 311.
The message
is extracted from the raw input, excluding the command prefix (311a
).
โ๏ธ Execution Logic
local fullMessage = raw:sub(5)
local jobs = {
ems = true
}
TriggerClientEvent('kartik-mdt:client:sendCall', source, fullMessage, true, jobs, "311")
๐งพ Triggered Event
kartik-mdt:client:sendCall
kartik-mdt:client:sendCall
Parameters:
Parameter
Type
Description
source
number
Source player ID sending the 311 call.
fullMessage
string
The actual message content (stripped from command prefix).
true
boolean
Indicates the call is anonymous.
jobs
table
Jobs to notify (ems = true
).
"311"
string
The type of call. In this case, a 311 non-emergency call.
โ
Example Usage
/311a Need medical help at Legion Square.
This sends an anonymous 311 message to EMS with the content: "Need medical help at Legion Square."
Last updated