So, this is a little "gps" library I wasted spent my afternoon putting together.
It started as a little experiment of mine a while ago. Then someone in chat mentioned gta v style gps systems, and I remembered I'd already poked at that idea once, though the original code was pretty janky. So I figured I'd take another shot at it.
The core "hack" is using gangzones as dots (think PacMan dots, it's the same concept: you're PacMan and the gangzones are the dots). Each dot is just a tiny, slightly overlapping gangzone chained together so it looks like a visually continuous line at normal distance.
Gangzones are extremely limited (we get 1024 per player for...reasons) so long routes have to be capped. Every dot consumes one slot, and a moderately long route (e.g. LS -> LV) can easily chew through 800 slots. Once a path hits around 600-ish zones (configurable), it doesn't just cut the rest off, it draws until the limit, then silently resumes once you physically reach that point on the route. It's not ideal, but it's the most stable workaround I could think of.
Under the hood, it uses a circular buffer with head/tail pointers. No array shifting, no O(n) operations every time you move a meter, it just bumps the pointer.
One thing worth stressing: if your script is already drawing a bunch of gangzones, you're going to hit the SA-MP limits immediately. Unfortunately, there's no real workaround for that as far as I know.
Visually, the lines are just overlapping squares. Zoom in and it looks like a staircase, zoom out and it smooths into a curve (I'd say it's a feature).
Also, we brute force the geometry by stepping along a vector and spawning a zone every few meters.
If nothing else, it was a fun little POC, and I had a good time building it. Hope it's useful.