SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 11/10/2011, 03:58 PM   #1
Kyle
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,259
Reputation: 330
Default Gps System Using Nodes

N/A.
__________________

Last edited by Kyle; 04/02/2015 at 03:52 PM.
Kyle is offline   Reply With Quote
Old 11/10/2011, 09:28 PM   #2
Kyle
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,259
Reputation: 330
Default Re: Gps System Using Nodes [PAYING]

bump da dump!
__________________
Kyle is offline   Reply With Quote
Old 11/10/2011, 10:10 PM   #3
Gamer_Z
Guest
 
Posts: n/a
Default Re: Gps System Using Nodes [PAYING]

whyui donr;'t uyoui usew somenione nodews rewader tot reasd noes??
MAns sryyyyyu I'm a bit druhnk I hope Ijehleped u.................

http://forum.sa-mp.com/showthread.php?t=269695
http://forum.sa-mp.com/showthread.ph...d.php?t=269695

FREWASAAHHHH TYEAHHH!!!!!!! NOOO NEEEEDPL TO PswaAAAAY
  Reply With Quote
Old 12/10/2011, 06:54 AM   #4
Kyle
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,259
Reputation: 330
Default Re: Gps System Using Nodes [PAYING]

Quote:
Originally Posted by Gamer_Z View Post
whyui donr;'t uyoui usew somenione nodews rewader tot reasd noes??
MAns sryyyyyu I'm a bit druhnk I hope Ijehleped u.................

http://forum.sa-mp.com/showthread.php?t=269695

FREWASAAHHHH TYEAHHH!!!!!!! NOOO NEEEEDPL TO PswaAAAAY
That don't really help, as it has no code there or calculation for understanding of the algorithm in gta.

Kyle
__________________
Kyle is offline   Reply With Quote
Old 12/10/2011, 08:17 AM   #5
Ensconce
Big Clucker
 
Join Date: Apr 2011
Posts: 58
Reputation: 7
Default Re: Gps System Using Nodes [PAYING]

Nodes can either be created yourself or extracted from nodes.dat. However, there are around 27,000+ nodes in nodes.dat which make all the single player traffic work. You then need to select an algorithm to use to find the shortest distance form Point A to Point B. The most popular algorithm being used to do this is 'Dijkstra Algorithim' or a modification of it. It can find the shortest distance from Point A to Point B by working out the lowest 'cost' to all nodes adjacent to a given node. It does this for all nodes, which is why using nodes from nodes.dat can take very long.

So, to make a GPS, you need to first research the dijkstra's algorithm and understand how it actually works. Then you can look up some pseudo code for it and apply it to pawn, you'll probably have to modify it to make it work though. Then you need to either drive around SA, and save the co-ordinates of all the intersections. These will be your nodes. You also need to figure out a way to find out the 'neighbours' of a particular node. Then you put it all together, use Race checkpoints, and create a command that searches for the nearest node to the players location, and figure out the shortest path from that node to the node nearest to the finishing location.

I do not believe in scripting for money, which is why I have taken time to tell you how you can create such a GPS system.

TL DR: How to make the GPS system.
Ensconce is offline   Reply With Quote
Old 12/10/2011, 12:46 PM   #6
Gamer_Z
Guest
 
Posts: n/a
Default Re: Gps System Using Nodes [PAYING]

Ok I was a bit drunk I see.... but em yeah Ensconce provided some usefull information and I'm going to investigate it and if I success in making some working routes I will try to make a filterscript or plugin (if it takes too much time) for it which will calculate the route in background.
  Reply With Quote
Old 12/10/2011, 02:52 PM   #7
Kyle
High-roller
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,259
Reputation: 330
Default Re: Gps System Using Nodes [PAYING]

Quote:
Originally Posted by Ensconce View Post
Nodes can either be created yourself or extracted from nodes.dat. However, there are around 27,000+ nodes in nodes.dat which make all the single player traffic work. You then need to select an algorithm to use to find the shortest distance form Point A to Point B. The most popular algorithm being used to do this is 'Dijkstra Algorithim' or a modification of it. It can find the shortest distance from Point A to Point B by working out the lowest 'cost' to all nodes adjacent to a given node. It does this for all nodes, which is why using nodes from nodes.dat can take very long.

So, to make a GPS, you need to first research the dijkstra's algorithm and understand how it actually works. Then you can look up some pseudo code for it and apply it to pawn, you'll probably have to modify it to make it work though. Then you need to either drive around SA, and save the co-ordinates of all the intersections. These will be your nodes. You also need to figure out a way to find out the 'neighbours' of a particular node. Then you put it all together, use Race checkpoints, and create a command that searches for the nearest node to the players location, and figure out the shortest path from that node to the node nearest to the finishing location.

I do not believe in scripting for money, which is why I have taken time to tell you how you can create such a GPS system.

TL DR: How to make the GPS system.
First of all thanks for taking time to write this up, but it's Dijkstra's algorithm I do not understand. I've watched many tutorials on the internet on it and yet still cannot understand it, hence me paying for it.

Thanks

Kyle
__________________
Kyle is offline   Reply With Quote
Old 12/10/2011, 05:23 PM   #8
[03]Garsino
Guest
 
Posts: n/a
Default Re: Gps System Using Nodes [PAYING]

Quote:
Originally Posted by KyleSmith View Post
First of all thanks for taking time to write this up, but it's Dijkstra's algorithm I do not understand. I've watched many tutorials on the internet on it and yet still cannot understand it, hence me paying for it.

Thanks

Kyle
Paying people won't help you learn it at all. You'd to better off by keep trying yourself.
  Reply With Quote
Old 12/10/2011, 07:20 PM   #9
Gamer_Z
Guest
 
Posts: n/a
Default Re: Gps System Using Nodes [PAYING]

Quote:
Originally Posted by [03]Garsino View Post
Paying people won't help you learn it at all. You'd to better off by keep trying yourself.
I'm making one and progress is going well
  Reply With Quote
Old 12/10/2011, 08:30 PM   #10
RyDeR`
High-roller
 
RyDeR`'s Avatar
 
Join Date: Feb 2009
Location: Belgium
Posts: 2,929
Reputation: 700
Default Re: Gps System Using Nodes [PAYING]

@Gamer_Z:

You better don't release that. If you do so, it won't be considered as unique anymore cause then, everyone will have it in his server.
__________________

Sup?
RyDeR` is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paying for Y_INI basic dialog save system SpankMe2 Help Archive 5 29/07/2011 10:49 PM
[Paying] Need a custom user, VIP and admin system scripted. Jack_Leslie Help Archive 4 30/06/2011 03:42 AM
Problem wih Nodes Rule111 Help Archive 0 17/05/2011 12:11 AM
Nodes/Paths from San Andreas RyDeR` Everything and Nothing 9 28/12/2010 02:48 PM


All times are GMT. The time now is 02:36 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.