Add alerts
Default Alert Commands
-- Priority 'low', 'medium' or 'high'
-- Car robbery, shop robbery and bank robbery can be found inside client/api/alert_handlers.lua
CL_CONFIG.AlertCommands = {
{
command = '911',
job = { 'police' },
code = '10-13',
default_priority = 'medium',
enabled = true,
anonymous = false,
--timeout = 10, --Optional timeout you can set in seconds
},
{
command = 'anon911',
job = { 'police' },
code = '10-13',
default_priority = 'medium',
enabled = true,
anonymous = true,
},
{
command = 'sos',
code = 'P2',
job = { 'police', 'ambulance' },
prepared_args = 'A officer is in need of assistance, please come as fast as possible.',
default_priority = 'high',
enabled = true,
anonymous = true,
blip_time = 5,
-- job_restricted = 'police', or { 'police', 'ambulance' } (optional)
sos = true,
blip = { -- Optional parameter to override the default blip
sprite = 84,
colour = 3,
scale = 0.7,
flashes = true,
text = '10-13 - Officer in distress',
}
},
{
command = 'emergency',
code = 'P2',
job = { 'police', 'ambulance' },
default_priority = 'high',
enabled = true,
anonymous = false,
}
}Alert Command Parameters
Custom Alerts
Client-Side API
Getting Player Data
Player Data (On Foot)
Player Data (In Vehicle)
Sending Custom Alerts (Client)
Server-Side API
Sending Alerts from Server
Getting Player Data from Server
Alert Types for Statistics
Complete Example: Car Theft Alert with Screenshot
API Reference
Alert Data Structure
Parameter
Type
Required
Description
Blip Configuration
Parameter
Type
Description
Last updated