Jump to content
Sign in to follow this  
PNWParksFan

How to get location as displayed in dispatch window?

Recommended Posts

The location of a callout is shown when a callout is dispatched, and is heard over the radio when requesting backup. Is there any way to tie into that system in a plugin? I know you can use PlayScannerAudioUsingPosition to have the radio say the location, but I want to get the location text as shown in the notifications when initiating a callout. I found GetStreetName in the ragepluginhook API, but that's too specific. I want the more general locations, like "Paleto Forest", "Davis", "Los Santos Airport", etc. Any idea how to get that?

Share this post


Link to post
Share on other sites
On 8/7/2015 at 6:43 AM, alexguirre said:

Looks like I still need the WorldZone :sweat: to get the RealAreaName. I trying to use the native GET_NAME_OF_ZONE but I can't get it to work, For what I need it, it isn't anything crucial so I can remove it if the WorldZone ends up been private

 

EDIT: now I no longer need the WorldZone, I made that function myself. :smile:

@alexguirre it looks like you accomplished this somehow? Might you be able to share how you did that?

Share this post


Link to post
Share on other sites
8 hours ago, PNWParksFan said:

The location of a callout is shown when a callout is dispatched, and is heard over the radio when requesting backup. Is there any way to tie into that system in a plugin? I know you can use PlayScannerAudioUsingPosition to have the radio say the location, but I want to get the location text as shown in the notifications when initiating a callout. I found GetStreetName in the ragepluginhook API, but that's too specific. I want the more general locations, like "Paleto Forest", "Davis", "Los Santos Airport", etc. Any idea how to get that?

It seems like they are keeping the WorldZone class since they added Functions.GetZoneAtPosition() that returns a WorldZone. You can use it this way
 

Spoiler

            Vector3 position = Game.LocalPlayer.Character.Position;
            LSPD_First_Response.Engine.Scripting.WorldZone worldZone = Functions.GetZoneAtPosition(position);

            //then depending on what you need you can use any of the properties
            worldZone.AudioName;
            worldZone.GameName;
            worldZone.RealAreaName;
            worldZone.County
            worldZone.CallPrefix;
            worldZone.CrimeModifier;

I didn't do it that way because I thought they were going to make it private.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×