RedM Natives

TASK_REACT

Makes a ped react to an entity.

Hash0xC4C32C31920E1B70
Runtime nameTaskReact
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207

Signature

void TASK_REACT(Ped ped, Entity reactingTo, float x, float y, float z, const char* reactionName, float p6, float p7, int p8);

Parameters

NameTypeDescription
pedPed—
reactingToEntity—
xfloat—
yfloat—
zfloat—
reactionNameconst char*—
p6float—
p7float—
p8int—

Returns void

Description

Makes a ped react to an entity.
Params: reactingTo Entity can be 0, p8 is always 4

Usage

Lua
TaskReact(ped, reactingTo, x, y, z, reactionName, p6, p7, p8)

-- always works, by hash
Citizen.InvokeNative(0xC4C32C31920E1B70, ped, reactingTo, x, y, z, reactionName, p6, p7, p8)
JavaScript and C#
JavaScript
TaskReact(ped, reactingTo, x, y, z, reactionName, p6, p7, p8);

// by hash
Citizen.invokeNative('0xC4C32C31920E1B70', ped, reactingTo, x + 0.0000001, y + 0.0000001, z + 0.0000001, reactionName, p6 + 0.0000001, p7 + 0.0000001, p8);
C#
Function.Call((Hash)0xC4C32C31920E1B70, ped, reactingTo, x, y, z, reactionName, p6, p7, p8);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.