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

Thanks for the quick response!

1 Like


As you can see on the picture, im trying to add a new notification in the script you made, and not an extern script. I can’t see whats wrong. I also made a Config to it.

1 Like

Looks like it may be inside the vehicle check loop. Regardless you can go ahead and update to the new release which has a melee check included.

1 Like

Soooo idk if you know yet but attempt to call a nil value (global '_U) happening on line 37

1 Like

Line 37 on server.lua? It’s _U(‘melee’), which is defined in the locales.

1 Like

yeah i installed the latest version to my server and now im getting that as an error in console when the script starts

1 Like

I can’t get the error to show up unless I disable the locale.lua include, which causes several additional errors. I’m assuming that removing the melee table just results in the next one (officerdown) triggering the nil value.

_U() is a function included in esx so I don’t know why it wouldn’t be defined for you. Is your framework modified and perhaps the function is renamed or something?

1 Like

So the script seems to be working lovely just one current error in the F8 console.

1 Like

Edit line 9 in server.lua to use the identifier used in your database. If you use characters instead of users then swap that too.

EDIT: Go grab the latest release, grabbing identifier differently on top of some fixes.

2 Likes

Nice script. I am not getting any errors but the blip is being sent to the same location each time a call is sent when it should be putting it where the call was dialed. It’s somewhere east Rockford. Any ideas what might be causing this? Anytime a player sends a call, whether it’s dying or using the command, it goes to that same spot for every player.

Coords all calls get sent to.
-0.0049089728854597, -0.0093937795609236, 71.152374267578, 120.94792938232

1 Like

That would happen if playerPed or playerCoords aren’t being set properly. Can you replace your 911 command with the code below and tell the the results of the print in console?

It’s just checking the saved variables and making new ones with the same info.

RegisterCommand('911', function(playerId, args, rawCommand)
    args = table.concat(args, ' ')
    local caller
    pedLocation(GetLabelText(GetNameOfZone(playerCoords.x, playerCoords.y, playerCoords.z)))
    if Config.PhoneNumber then caller = phone else caller = ('%s %s'):format(firstname, lastname) end
    if Config.Default911 then TriggerServerEvent('mdt:newCall', args, caller, vector3(playerCoords.x, playerCoords.y, playerCoords.z)) else
        TriggerServerEvent('wf-alerts:svNotify911', args, caller, playerStreetsLocation, vector3(playerCoords.x, playerCoords.y, playerCoords.z))
    end
    print( ('playerPed: %s, playerCoords: %s, playerStreetsLocation: %s'):format(playerPed, vector3(playerCoords), playerStreetsLocation) )
    local getEntityCoords = GetEntityCoords(PlayerPedId())
    local streetandzone = ('%s, %s'):format(GetStreetNameFromHashKey(GetStreetNameAtCoord(getEntityCoords.x, getEntityCoords.y, getEntityCoords.z)), GetLabelText(GetNameOfZone(getEntityCoords)) )
    print( ('PlayerPedId(): %s, GetEntityCoords: %s, streetandzone: %s'):format(PlayerPedId(), getEntityCoords, streetandzone) )
end, false)

EDIT: Also, when the notification sends does it say the correct street and zone?

2 Likes

The street name is incorrect. Always showing West Vinewood. Same goes for medical calls.

image

Even showing Spanish Ave / West Vinewood in the MDT when I dialed this from Sinner St at Mission Row PD.

Police are also no receiving alerts for a variety of calls such as speeding, reckless, shots fired, etc.

1 Like

For some reason the playerPed variable is being set incorrectly. I’ve pushed an update with various changes on top of a fix for that.

2 Likes

Running into a small issue with the recent version.

1 Like

Line 250, accidentally left some code behind.
playerPed = PlayerPedId() end
remove end

2 Likes

Hey Lindon, the drug selling we were talking about, what script would i put that client call in? the alert? the mdt? or drugs?

1 Like

Go into your drug script and find where it currently has a notification for the cops, put in the necessary code to trigger svNotify and disable the default stuff. You can trigger it from either serverside or clientside.

1 Like

yeah so i put the original code that you provided for notifying but am not sure how to trigger it, when we sell nothing happens so far

1 Like

i feel stupid its because i turned it to 911 calls instead of WF alerts, thanks for the help man

1 Like

Edit Ignore me. Seen the newest update has a change for what i wanted

1 Like