Skip to content

setPedDriveWander

Client-side

Available in Neon, not standard MTA

Assigns GTA's indefinite road-cruising task to an owned ped already driving an owned vehicle.

Syntax

bool setPedDriveWander(ped thePed, vehicle theVehicle, float speed [, string|int drivingStyle = 0])

GTA task mapping

ORIGINAL GTA TASK 05D2
CTaskComplexCarDriveWander

SCM equivalent: TASK_CAR_DRIVE_WANDER

Neon calls GTA's original constructor and preserves the verified speed, driving-style, and autopilot layout. The task runs until it is replaced or cancelled.

Arguments

thePedped

Living streamed ped simulated by this client.

theVehiclevehicle

Streamed, non-blown vehicle occupied by the ped as driver.

speedfloat

Finite speed from 0 through 255.

drivingStylestring|intoptional · default 0

Integer 0..6 or one of the documented stop/avoid/plough-through names.

Returns

true when the native wander task was assigned; false when ownership, vehicle, seat, speed, or style 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:setDriveWander(vehicle, speed, drivingStyle)

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →