TasksClient

setDriveTaskDrivingStyle

SET_DRIVE_TASK_DRIVING_STYLE0xDACE1BE37D88AF67

The GTA V native SET_DRIVE_TASK_DRIVING_STYLE of the TASK namespace, as LS:MP client scripts call it: the global function setDriveTaskDrivingStyle, in JavaScript and in Lua.

SignatureJavaScript
setDriveTaskDrivingStyle(ped: Ped, drivingStyle: number): void
SignatureLua
setDriveTaskDrivingStyle(ped: Ped, drivingStyle: integer)

Usage

JavaScript
setDriveTaskDrivingStyle(ped, drivingStyle);
Lua
setDriveTaskDrivingStyle(ped, drivingStyle)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
drivingStyleintnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

This native is used to set the driving style for specific ped.

Driving styles id seems to be:
786468
262144
786469

https://gtaforums.com/topic/822314-guide-driving-styles/

Reference

Namespace
Tasks TASK
In the game
void SET_DRIVE_TASK_DRIVING_STYLE(Ped ped, int drivingStyle)
Hash
0xDACE1BE37D88AF67

Open in the interactive natives reference