SA-MP Forums Archive
How i can make that system? - 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: How i can make that system? (/showthread.php?tid=660277)



How i can make that system? - Dello - 29.10.2018

Hi! їHow r u?
Im trying to make GPS System like GTA V. Searching on ****** i found this -> https://github.com/janglapuk/SAMP-GPS An amazing GPS System with minimap path to destination.

їHow i can pass ASI file to Pawn code? There are a way to do this? If not, how i can script it based on the ASI code?

Thank you all .


Re: How i can make that system? - TheToretto - 29.10.2018

It's just a mod as others such as a GTA IV Hud... EML... A clientside mod.


Re: How i can make that system? - rockys - 29.10.2018

imposibble to create in pawn


Re: How i can make that system? - NaS - 29.10.2018

You can recreate it using Gamer_Z's RouteConnector/GPS Plugin and GangZones.
For per-player GangZones you can use the YSF Plugin.


Re: How i can make that system? - Dello - 30.10.2018

Thank u so much, now i found this https://sampforum.blast.hk/showthread.php?tid=336000

That helps me to make the gps system no? How i can use it?


Re: How i can make that system? - GTLS - 30.10.2018

Path Fiding on a Minimap is VERY VERY VERY hard and advance level of programming. Its easy to do it in a game while its still being developed. SAMP's code and GTA SA's code is different. I dont think its possible for anyone on forums to do that.


Re: How i can make that system? - NaS - 30.10.2018

Quote:
Originally Posted by GTLS
View Post
Path Fiding on a Minimap is VERY VERY VERY hard and advance level of programming. Its easy to do it in a game while its still being developed. SAMP's code and GTA SA's code is different. I dont think its possible for anyone on forums to do that.
It has been done already.

There's the RouteConnector Plugin which can calculate the paths of the roads which is fairly easy to use. To show them on the radar, you can use GangZones.


Re: How i can make that system? - GTLS - 30.10.2018

Quote:
Originally Posted by NaS
View Post
It has been done already.

There's the RouteConnector Plugin which can calculate the paths of the roads which is fairly easy to use. To show them on the radar, you can use GangZones.
He still has to sync GangZones which could be pretty headache. Also, the Path to PlayerMaker will not be available, a note to OP. This GPS will work for Server Sided scripted points only.


Re: How i can make that system? - Dello - 31.10.2018

Quote:
Originally Posted by NaS
View Post
It has been done already.

There's the RouteConnector Plugin which can calculate the paths of the roads which is fairly easy to use. To show them on the radar, you can use GangZones.
I really want to do that system. How can i contact with you?

I dont have any idea of how i can calculate paths, and where i can get that paths.

If you could help me i will appreciate it <3


Re: How i can make that system? - NaS - 01.11.2018

Quote:
Originally Posted by GTLS
View Post
Also, the Path to PlayerMaker will not be available, a note to OP. This GPS will work for Server Sided scripted points only.
No. You can calculate a path from any node to any other node on the whole GTA SA Map and even custom maps if you add paths to them. You can get the closest node from the player's last marked position and use it as target for the calculation (which will be on the closest road to the marker).

I did a GPS system with gang zones 2011 (as part of the FS competition Gamer_Z did back then), sadly I cannot show you the video since it is on utube.
It looked exactly like the video of the singleplayer mod just that the path is a bit more pixelated because GangZones are rectangles.

I don't have the code anymore but it really isn't that hard to do.

Simply calculate a path using the GPS Plugin, when that has finished use the resulting node array to draw GangZones on the map. Save the GZ IDs into an array. Use the Plugin's Node Array feature to store the Path Nodes.
When the player moves check if he is still on the original path - if he is, destroy the gang zones behind him (since they were already visited).
If he isn't, re-calculate the path, destroy all Gang Zones of that path and draw the new path (etc).

Since nodes are usually a few meters away from each other, you should not use just one GangZone for a node, but build a line of GangZones between each node. Also no rocket science.