Skip to content

setPedGoTo

Client-side

Available in Neon, not standard MTA

Replaces the owned ped's primary task with GTA's native go-to-and-stand-still task.

Syntax

bool setPedGoTo(ped thePed, Vector3 target [, string movement = "walk", float radius = 0.5, float slowdownRadius = 2.0, int timeout = -2])

GTA task mapping

ORIGINAL GTA TASK 05D3
CTaskComplexGoToPointAndStandStillCTaskComplexGoToPointAndStandStillTimed

SCM equivalent: TASK_GO_STRAIGHT_TO_COORD

Neon selects the untimed task for timeout -2. Every other value uses the timed variant, with -1 normalized to GTA's 20-second SCM default.

Arguments

thePedped

Living streamed ped simulated by this client.

targetVector3

Finite destination.

movementstringoptional · default walk

walk, run, or sprint.

radiusfloatoptional · default 0.5

Positive arrival radius.

slowdownRadiusfloatoptional · default 2.0

Slowdown radius not smaller than radius.

timeoutintoptional · default -2

-2 for untimed, -1 for SCM-compatible 20 seconds, or a non-negative millisecond timeout.

Returns

true when the native task was installed; false when ownership, streaming, liveness, target, movement, radius, or timeout checks fail.

Ownership and lifecycle

Low-level ped task calls require the client that simulates the living, streamed ped. Driving tasks also require control of the streamed vehicle. They do not create lifecycle handles; the optional native-task-runtime adds server-owned route epochs and reconstruction for drive_to routes. Gang-tag ownership is resource-exclusive, survives object streaming and recreation, and is released automatically when the owner stops.

OOP aliases

  • ped:setGoTo(target, movement, radius, slowdownRadius, timeout)

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →