SA-MP Forums Archive
Path nodes to zone polygons? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Path nodes to zone polygons? (/showthread.php?tid=644279)



Path nodes to zone polygons? - Chaser98 - 05.11.2017

Hey guys, I've been wanting to essentially make a 2d polygon zone of all the roads and streets in SA and essentially have street names like in GTA V.

I know there's data on the path nodes but I don't know how I'd go about converting it to polygon zones w/ streamer plugin.

There may be an easier way of doing this, and if you know, please share and I'd appreciate it.

EDIT: I think I may have posted in wrong section. If I did, please move it mods. My apologies.


Re: Path nodes to zone polygons? - cessil - 08.11.2017

yes there are nodes and from them you can determine several things like if a player is driving on the wrong side of the road or on a road at all, you could also attach names to the roads to display to players which is what you are looking for
https://sampforum.blast.hk/showthread.php?tid=575149

given that the nodes are a mess and you won't be able to read them and know exactly where they are what I would do is create a program to visualise the nodes with the san andreas map as a background and have the function to add an id to each node which would link to a string of the road name
which is also something I did but without the ability to add names to roads
https://sampforum.blast.hk/showthread.php?tid=564533


Re: Path nodes to zone polygons? - Chaser98 - 16.11.2017

Is there any way other than manual drawing to separate road from road? Like when a road dead ends into another road with a different name.


Re: Path nodes to zone polygons? - cessil - 16.11.2017

yes there would be if you scripted it to since you could grab a node and run a loop to grab all it's neighbours till it runs into an intersection