|
1 | 1 | <meta> |
2 | | - <info author="arc_" type="script" version="1.0.0"/> |
| 2 | + <info author="arc_" type="script" version="1.1.0" description="Calculates and displays the quickest road path between two points/nodes on the map. Commands: /path node1 node2 /path2 x y [z]. Resource contains export functions for custom logic."/> |
3 | 3 |
|
4 | 4 | <script src="util.lua" type="client"/> |
5 | 5 | <script src="client.lua" type="client"/> |
|
10 | 10 | <script src="vehiclenodes.lua" type="server"/> |
11 | 11 | <script src="MinHeap.lua" type="server"/> |
12 | 12 | <script src="gps.lua" type="server"/> |
| 13 | + |
| 14 | + <export function="calculatePathByCoords" type="server"/> <!--calculatePathByCoords(float x1, float y1, float [z1], float x2, |
| 15 | + float y2, float [z2]) |
| 16 | + Function returns a table with the ID (int), neighbours (table), x (float), y (float), z (float) otherwise false. So the |
| 17 | + original GTA vehicle node points in ascending order from point A to point B.--> |
| 18 | + <export function="calculatePathByNodeIDs" type="server"/> <!--calculatePathByNodeIDs(int node1, int node2) |
| 19 | + Function returns a table with the ID (int), neighbours (table), x (float), y (float), z (float) otherwise false. So the |
| 20 | + original GTA vehicle node points in ascending order from node A to node B.--> |
| 21 | + <export function="addLinePoint" type="client"/> <!--addLinePoint(float posX, float posY) |
| 22 | + Function returns true if successful otherwise false. |
| 23 | + Draws the path on the client HUD mini map in ascending order. For example, if you use the table returned by the calculatePathByCoords |
| 24 | + or calculatePathByNodeIDs function. |
| 25 | + If you add your own line points points they must be very close to each other, otherwise the path will not be drawn properly.--> |
| 26 | + <export function="removeLinePoints" type="client"/> <!--removeLinePoints() |
| 27 | + Function returns nil. |
| 28 | + Removes the line points of the addLinePoint function respectively the drawn lines of the client HUD mini map. |
| 29 | + This can be used, for example, when the target node point has been reached or a player gets out of the vehicle.--> |
13 | 30 | </meta> |
0 commit comments