TASK_REACT
Makes a ped react to an entity.
Signature
void TASK_REACT(Ped ped, Entity reactingTo, float x, float y, float z, const char* reactionName, float p6, float p7, int p8);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
reactingTo | Entity | — |
x | float | — |
y | float | — |
z | float | — |
reactionName | const char* | — |
p6 | float | — |
p7 | float | — |
p8 | int | — |
Returns void
Description
Makes a ped react to an entity.
Params: reactingTo Entity can be 0, p8 is always 4
Usage
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#
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);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.