Skip to content

Commit

Permalink
Update TaskFollowPointRoute.md (#943)
Browse files Browse the repository at this point in the history
* Update TaskFollowPointRoute.md

Added flags and updated the name of the intunknown

* Update TaskFollowPointRoute.md

Made requested changes...hope this follows the pattern needed

* Update TaskFollowPointRoute.md

(Hopefully) fixed enum so that it's formatted properly!
Used the above example...as an example

* Update TaskFollowPointRoute.md

Committing to change to the last parameter name pending any additional enum changes needed

* Update TaskFollowPointRoute.md

Hopefully this is the appropriate change.  Still willing to try again if not. Thanks!

* Update TaskFollowPointRoute.md

Clean up old remnants and port over usage example.

* Remove extra headers

* Update TASK/TaskFollowPointRoute.md

---------

Co-authored-by: ammonia-cfx <[email protected]>
Co-authored-by: Dillon Skaggs <[email protected]>
  • Loading branch information
3 people authored Aug 7, 2024
1 parent 31eebe9 commit d483169
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions TASK/TaskFollowPointRoute.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,33 @@ ns: TASK

```c
// 0x595583281858626E 0xB837C816
void TASK_FOLLOW_POINT_ROUTE(Ped ped, float speed, int unknown);
void TASK_FOLLOW_POINT_ROUTE(Ped ped, float speed, int routeMode);
```
```
MulleKD19: Makes the ped go on the created point route.
ped: The ped to give the task to.
speed: The speed to move at in m/s.
int: Unknown. Can be 0, 1, 2 or 3.
Example:
TASK_FLUSH_ROUTE();
TASK_EXTEND_ROUTE(0f, 0f, 70f);
TASK_EXTEND_ROUTE(10f, 0f, 70f);
TASK_EXTEND_ROUTE(10f, 10f, 70f);
TASK_FOLLOW_POINT_ROUTE(GET_PLAYER_PED(), 1f, 0);
Makes the ped go on a point route.
```c
enum eFollowPointRouteMode {
TICKET_SINGLE = 0,
TICKET_RETURN = 1,
TICKET_SEASON = 2,
TICKET_LOOP = 3
}
```

This native is often times used with [`TASK_FLUSH_ROUTE`](#_0x841142A1376E9006) and [`TASK_EXTEND_ROUTE`](#_0x1E7889778264843A)


## Parameters
* **ped**: The ped to give the task to.
* **speed**: The speed to move at in m/s.
* **unknown**: Unknown. Can be 0, 1, 2 or 3.
* **routeMode**: The route mode to use, refer to `eFollowPointRouteMode`

## Examples
```lua
TaskFlushRoute()
TaskExtendRoute(0.0, 0.0, 70.0)
TaskExtendRoute(10.0, 0.0, 70.0)
TaskExtendRoute(10.0, 10.0, 70.0)
TaskFollowPointRoute(PlayerPedId(), 1.0, 0)
```

0 comments on commit d483169

Please sign in to comment.