TasksClient

taskChatToPed

TASK_CHAT_TO_PED0x8C338E0263E4FD19

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

SignatureJavaScript
taskChatToPed(
  ped: Ped,
  target: Ped,
  flags: number,
  goToLocationX: number,
  goToLocationY: number,
  goToLocationZ: number,
  headingDegs: number,
  idleTime: number
): void
SignatureLua
taskChatToPed(
  ped: Ped,
  target: Ped,
  flags: integer,
  goToLocationX: number,
  goToLocationY: number,
  goToLocationZ: number,
  headingDegs: number,
  idleTime: number
)

Usage

JavaScript
taskChatToPed(
  ped, target, flags, goToLocationX, goToLocationY, goToLocationZ, headingDegs, idleTime
);
Lua
taskChatToPed(
    ped, target, flags, goToLocationX, goToLocationY, goToLocationZ, headingDegs, idleTime
)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
taskChatToPed(ped, target, flags, goToLocation, headingDegs, idleTime);
Lua · with vectors
taskChatToPed(ped, target, flags, goToLocation, headingDegs, idleTime)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
targetPednumberinteger
flagsintnumberinteger
goToLocationXfloatnumbernumber
goToLocationYfloatnumbernumber
goToLocationZfloatnumbernumber
headingDegsfloatnumbernumber
idleTimefloatnumbernumber

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.

p2 tend to be 16, 17 or 1
p3 to p7 tend to be 0.0

Reference

Namespace
Tasks TASK
In the game
void TASK_CHAT_TO_PED(Ped ped, Ped target, int flags, float goToLocationX, float goToLocationY, float goToLocationZ, float headingDegs, float idleTime)
Hash
0x8C338E0263E4FD19

Open in the interactive natives reference