Thanks for the quick response!
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.
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.
Soooo idk if you know yet but attempt to call a nil value (global '_U) happening on line 37
Line 37 on server.lua? It’s _U(‘melee’), which is defined in the locales.
yeah i installed the latest version to my server and now im getting that as an error in console when the script starts
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?
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.
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
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?
The street name is incorrect. Always showing West Vinewood. Same goes for medical calls.

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.
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.
Line 250, accidentally left some code behind.
playerPed = PlayerPedId() end
remove end
Hey Lindon, the drug selling we were talking about, what script would i put that client call in? the alert? the mdt? or drugs?
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.
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
i feel stupid its because i turned it to 911 calls instead of WF alerts, thanks for the help man
Edit Ignore me. Seen the newest update has a change for what i wanted

