Developer Documentation
Exports List
AddAlert (Serversided)
exports["zerio-dispatch"]:AddAlert(alertData<table>, menuIndex<number>)
You may add or remove as many fields as you want to.
Official list for icons: MaterialDesignIcons
Example:
exports["zerio-dispatch"]:AddAlert({
blipId = 161,
position = {0,0,0},
sound = "adddispatch.mp3",
description = "There was an carjacking down at Popular Street",
top = {
text = "Carjacking",
code = "10-22"
},
fields = {
{
text = "Popular street",
icon = "mdi-earth",
},
{
text = "Adder [ABC 123]",
icon = "mdi-car",
},
{
text = "Black, White",
icon = "mdi-palette",
}
}
}, 2)
AddAlert (Server Event, from client)
TriggerServerEvent("zerio-dispatch:server:addAlert", menuIndex<number>, alertData<table>)
You may add or remove as many fields as you want to.
Official list for icons: MaterialDesignIcons
Example:
TriggerServerEvent("zerio-dispatch:server:addAlert", 1, {
blipId = 161,
position = {0,0,0},
sound = "adddispatch.mp3",
description = "There was an carjacking down at Popular Street",
top = {
text = "Carjacking",
code = "10-22"
},
fields = {
{
text = "Popular street",
icon = "mdi-earth",
},
{
text = "Adder [ABC 123]",
icon = "mdi-car",
},
{
text = "Black, White",
icon = "mdi-palette",
}
}
})
AddAlert (Client Export)
exports["zerio-dispatch"]:AddAlert(menuIndex<number>, alertData<table>)
This export can be used as an alternative to triggering the server event directly.
The difference is that this export automatically adds the player position & street name field.
So if you wish to use this, do not include the street name field or position value.
Example:
exports["zerio-dispatch"]:AddAlert(1, {
blipId = 161,
sound = "adddispatch.mp3",
description = "There was an carjacking down at Popular Street",
top = {
text = "Carjacking",
code = "10-22"
},
fields = {
{
text = "Adder [ABC 123]",
icon = "mdi-car",
},
{
text = "Black, White",
icon = "mdi-palette",
}
}
})
GetAlerts (Serversided)
exports["zerio-dispatch"]:GetAlerts(menuIndex<number>) -- Returns: alerts<table>
Example:
local alerts = exports["zerio-dispatch"]:GetAlerts(2)
for i = 1, #alerts, 1 do
local alert = alerts[i]
print(alert)
end