[ESX] outlawalert (WildFire alerts and Hypaste MDT integration)

Thank you so much for your help!

2 Likes

Works for EXM and ESX 1.2

1 Like

Hey linden, another question for you, how do i go about turning of default notifications for shots fired and carjacking again? it was done, but then i updated some stuff and they back on

1 Like

Working Nice with Esx 1.2 Just wish there was a fine button

1 Like

Wildfire alerts → What script is that (Script name)? That it intergrates with?

1 Like

I’m using a modified version of WF Alerts which is included in the resource, no need to install it too.

2 Likes

Hey hey! Loving this so much! Is there a way that I can move the notifications to display on the bottom right?

1 Like

Add -webkit-transform:rotate(180deg); to both .notif-container and .notification in style.css

2 Likes

May I ask where in esx_jewlrobbery this would go?

RegisterServerEvent('esx_JewelRobbery:policenotify')
AddEventHandler('esx_JewelRobbery:policenotify', function()
    local data = {displayCode = '211', description = 'Robbery', isImportant = 0, recipientList = {'police'}, length = '10000', infoM = 'fa-info-circle', info = 'Vangelico Jewelry Store'}
    local dispatchData = {dispatchData = data, caller = 'Alarm', street = 'Portola Dr, Rockford Hills', coords = vector3(-633.9, -241.7, 38.1)}
    TriggerEvent('wf-alerts:svNotify', dispatchData)
end)

Should work. Replace the existing event.

You are my hero!

There are two other scripts I am trying to implement with, if you could help with those I will love you longer time!
[Release] [ESX] loffe_robbery <— shop robberies
[Release] BadgerBankRobbery ← bank robberies

hey just a quick question im looking to make these alerts stay on the screen longer! how do i edit this?

That’s the pData.length variable in client.lua (it’s in ms, e.g. 4000 = 4 seconds by default)

awesome thank you so much it seems like the script was working but now when someone shoots its not showing up? is there a cooldown timer for these alerts? if so which line of code is that in? i want every shot to be an alert for example

There should be a cooldown, of course, but I dont exactly recall where it is, so you’re sorta on your own there :smiley:

ok ill try to look as well i have changed the alert time to stay on for 30 secs and it doesnt stay it still results back to the 4 secs?

Modifying if not pData.length then pData.length = 4000 end will change the length to 4 seconds for alerts that do not have their own set (speeding and autotheft).

Shooting is set to 6 seconds in its own data table, so you need to modify length = 6000 to the desired amount or remove it and increase the default length above.

At the top of client.lua there’s a for loop to create timers for each alert type

    if notLoaded then
        for k, v in pairs(Config.Enable) do
            if Config.Enable[k] ~= false then
                Config[k] = {}
                Config.Timer[k] = 0 -- Default to 0 seconds
                Config[k].Success = 300 -- Default to 30 seconds
                Config[k].Fail = 20 -- Default to 2 seconds
            end
        end
        -- If you want to set specific timers, do it here
        if Config.Shooting then
            Config.Shooting.Success = 150
            Config.Shooting.Fail = 0
        end
            
        notLoaded = nil
    end

This is creating 30 second timers for each alert type when they are sent, and adds a 2 second timer after failing a check; shooting is then being set to be a 15 second delay with no delay after failing to send.

How can I have it enter the coords, info, and street automatically? If you can…

local playerCoords = GetEntityCoords(PlayerPedId())
local street = exports['linden_outlawalert']:getStreetandZone(playerCoords)

Just look at the clientside file to see how to format notification data.

So if I tried putting that into this:

RegisterServerEvent('loffe_robbery:rob')
AddEventHandler('loffe_robbery:rob', function(store)
    local src = source
    Config.Shops[store].robbed = true
    local xPlayers = ESX.GetPlayers()
    for i = 1, #xPlayers do
        local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
        if xPlayer.job.name == 'police' then
            TriggerClientEvent('loffe_robbery:msgPolice', xPlayer.source, store, src)
        end
    end
    TriggerClientEvent('loffe_robbery:rob', -1, store)
    Wait(30000)
    TriggerClientEvent('loffe_robbery:robberyOver', src)

Like this:

RegisterServerEvent('loffe_robbery:rob')
AddEventHandler('loffe_robbery:rob', function(store)
    local src = source
    Config.Shops[store].robbed = true
    local xPlayers = ESX.GetPlayers()
    for i = 1, #xPlayers do
        local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
        if xPlayer.job.name == 'police' then
            TriggerClientEvent('loffe_robbery:msgPolice', xPlayer.source, store, src)
AddEventHandler('esx_JewelRobbery:policenotify', function()
   local playerCoords = GetEntityCoords(PlayerPedId())
local street = exports['linden_outlawalert']:getStreetandZone(playerCoords)
    TriggerEvent('wf-alerts:svNotify', dispatchData)
end)
        end
    end
    TriggerClientEvent('loffe_robbery:rob', -1, store)
    Wait(30000)
    TriggerClientEvent('loffe_robbery:robberyOver', src)

No go :frowning: