Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How can I set route to specific location?

Featured Replies

For ped and me.

I have a Vector3 property of destination

Firstly I want to set route for driving ped

And make navigated route on HUD map for player

Which method can I use for that?

Here is an example:

 

namespace YourCalloutsName.Callouts {


    [CalloutInfo("CalloutName", CalloutProbability.VeryHigh)]

    class YourCalloutName : Callout {

        private Vector3 YourDestination;
        private Blip PedsBlip;

        ...
        ...


        public override bool OnBeforeCalloutDisplayed() {

            YourDestination = World.GetNextPositionOnStreet(Game.LocalPlayer.Character.Position.Around(550f));            ------  Change Vector3 to an X,Y,Z Location
            ShowCalloutAreaBlipBeforeAccepting(PedsBlip, 30f);
            AddMinimumDistanceCheck(20f, YourDestination);

            CalloutMessage = "YourCalloutName";
            CalloutPosition = YourDestination;

            return base.OnBeforeCalloutDisplayed();
        }

        public override bool OnCalloutAccepted() {

            ...

            // Making new Ped and it's Blip.
            Ped = new Ped(YourDestination);
            Ped.BlockPermanentEvents = true;
            PedsBlip = Owner.AttachBlip();
            PedsBlip.Color = (System.Drawing.Color.Yellow);   // Ypu can change the color. 
            PedsBlip.EnableRoute(System.Drawing.Color.Yellow);  // You can change the color. 

            PedsBlip.IsFriendly = true;   // Depending your callout. 


            return base.OnCalloutAccepted();
        }


        public override void Process() {    // Your Callouts Process. (Scene)
            base.Process();

            if (Game.IsKeyDown(System.Windows.Forms.Keys.End)) {     // When User presses "END" key, the callout will forcefully end. Remember to delete your Blips! 

                Game.DisplayNotification("~g~Code 4~w~, return to patrol.");
                Functions.PlayScannerAudio("ATTENTION_ALL_UNITS WE_ARE_CODE_4");
                End();
            }


        }

    

        public override void End() {

            if (Ped.Exists()) {
                Ped.Dismiss();
            }
            if (PedsBlip.Exists()) {
                PedsBlip.Delete();
            }

            PedsBlip.DisableRoute();  // Disable.Route disables the GPS route. 

            base.End();
        } 
    }

}


 

 

Remember to always delete the In-Game Blips and GPS Routes when your Callout ends. They will not be deleted automatically. :

 

 

Hope this helps!

 

 

HELLO!!     I'm a Greek guy and YouTuber.   I really like Modding and playing LSPDFR!  I'm  very familiar with Programming (Coding) and PC Hardware / Software. I'm also a Cuber ( I Solve Rubicks Cubes and other kinds).   

My YouTube Channel:  https://www.youtube.com/c/ATGGGR/

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.