setPedDriveWander
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
05D2 CTaskComplexCarDriveWanderSCM 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
thePedpedLiving streamed ped simulated by this client.
theVehiclevehicleStreamed, non-blown vehicle occupied by the ped as driver.
speedfloatFinite speed from 0 through 255.
drivingStylestring|intoptional · default 0Integer 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
Continue exploring
← Back to the Neon Lua API · How Native ped tasks and gang tags works →