Player Location in chat message?

I’m trying to script something that announces a police officers last known street name via a command.
. I’ve messed around with a few of the PLDs that were released but can’t seem to figure it out. New to lua and learning. Any help would be greatly appreciated.

local street = nil
local intersection = nil
GetStreetNameAtCoord(x, y, z, street, intersection)
local result = GetStreetNameFromHashKey(street)
if intersection ~= nil then
    result = result .. " " .. GetStreetNameFromHashKey(intersection)
end

result should give you street + intersection

Appreciate it. Cant seem to get it how i want it though.

For example when someone does /backup in chat it’ll print out a chat message saying the intersection and street the person is on.

1 Like

Any other help with this?