Skip to content

setPedWander

Client-side

Available in Neon, not standard MTA

Starts GTA's standard on-foot wander task.

Syntax

bool setPedWander(ped thePed [, string movement = "walk", int direction = -1, bool wanderSensibly = true])

GTA task mapping

ORIGINAL GTA TASK 05DE
CTaskComplexWanderStandard

SCM equivalent: TASK_WANDER_STANDARD

A direction of -1 is resolved by GTA's native random-direction helper before the standard wander task is created.

Arguments

thePedped

Living streamed ped simulated by this client.

movementstringoptional · default walk

walk or run.

directionintoptional · default -1

-1 for GTA's native random direction, or a direction from 0 through 7.

wanderSensiblybooloptional · default true

Use the native sensible-wander behavior.

Returns

true when the task was queued; false for invalid movement, direction, ped state, ownership, or task construction.

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:setWander(movement, direction, wanderSensibly)

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →