Jump to content

Creating a Route/Blip to a coordinate


Recommended Posts

I have a Vector 3 (but can easily change to a Vector 2 obviously) and I want to create a route to that position on the map (and preferably add a blip at that point too). I've been playing around and trying to figure it out but no luck, hence why I'm here. So if any of you can give me some help with this it would be greatly appreciated! Thanks again. 

ScottyTooHotty

Link to comment
Share on other sites

AttachBlip only works for peds and vehicles, not vectors. To make a route to a vector3, use something like this:

            myBlip = new Blip(targetVector3);
            myBlip.EnableRoute();

 

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

Link to comment
Share on other sites

13 hours ago, Darkmyre said:

AttachBlip only works for peds and vehicles, not vectors. To make a route to a vector3, use something like this:


            myBlip = new Blip(targetVector3);
            myBlip.EnableRoute();

 

What he said. I believe it has to be a Vector3 as well, but I could be wrong. 

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

17 hours ago, Darkmyre said:

AttachBlip only works for peds and vehicles, not vectors. To make a route to a vector3, use something like this:


            myBlip = new Blip(targetVector3);
            myBlip.EnableRoute();

 

Works perfect, thanks a lot! @Stealth22 @Darkmyre

ScottyTooHotty

Link to comment
Share on other sites

1 hour ago, ScottehBoyy said:

Okay so I said works perfectly but it's not actually providing the route? I gives me a blip which is cool but no route? Any ideas? @Stealth22 @Darkmyre

MyBlip.IsRouteEnabled = true;

You must be in a vehicle for routes to display on the minimap.

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

19 minutes ago, ScottehBoyy said:

I've fixed it, your code was perfect! I made a typo, sorry guys. @Stealth22 @LtFlash @Darkmyre

No problem...:whistling:

Edited by Albo1125

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...