🛠️Exports

Exports you can use from other resources to send notification

Send Normal Dispatch

This for those who use Config.DispatchType = 'normal'.

exports['real-dispatch']:AddNormalDispatch(player, crime, street, gender, weapon, vehiclestatus, vehicleplate, vehiclecolor, coords, job)

Example Usage

RegisterCommand('SendNormalDispatch', function()
    local Player = PlayerPedId()
    local coords = GetEntityCoords(Player)
    exports['real-dispatch']:AddNormalDispatch(Player, 'Test Crime', 'Cennet Mahallesi', 'Male', 'AK47', 'Plane', '9/11', 'White', coords, {'police'})
end)

Send Dispatch To UI (Leaflet)

This for those who use Config.DispatchType = 'advanced'.

exports['real-dispatch']:AddDispatch(crime, street, gender, weapon, vehiclestatus, vehicleplate, vehiclecolor, coords)

Example Usage

RegisterCommand('SendDispatchToUI', function()
    local Player = PlayerPedId()
    local coords = GetEntityCoords(Player)
    exports['real-dispatch']:AddDispatch('Test Crime', 'Saudi Arabia', 'Female', 'Minigun', 'Plane', '9/11', 'White', coords)
end)

Last updated