Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TaskFollowPointRoute.md #943

Merged
merged 8 commits into from
Aug 7, 2024
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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**: Can be 0, 1, 2 or 3. (See flags)
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved

## 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)
```
Loading