RedM Natives

TASK_SMART_FLEE_COORD

Makes the specified ped flee the specified distance from the specified position.

Hash0x94587F17E9C365D5
Runtime nameTaskSmartFleeCoord
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x94587F17E9C365D5

Signature

void TASK_SMART_FLEE_COORD(Ped ped, float x, float y, float z, float distance, int time, int fleeType, float fleeSpeed);

Parameters

NameTypeDescription
pedPed—
xfloat—
yfloat—
zfloat—
distancefloat—
timeint—
fleeTypeint—
fleeSpeedfloat—

Returns void

Description

Makes the specified ped flee the specified distance from the specified position.
fleeType: see TASK_FLEE_COORD

Usage

Lua
TaskSmartFleeCoord(ped, x, y, z, distance, time, fleeType, fleeSpeed)

-- always works, by hash
Citizen.InvokeNative(0x94587F17E9C365D5, ped, x, y, z, distance, time, fleeType, fleeSpeed)
JavaScript and C#
JavaScript
TaskSmartFleeCoord(ped, x, y, z, distance, time, fleeType, fleeSpeed);

// by hash
Citizen.invokeNative('0x94587F17E9C365D5', ped, x + 0.0000001, y + 0.0000001, z + 0.0000001, distance + 0.0000001, time, fleeType, fleeSpeed + 0.0000001);
C#
Function.Call((Hash)0x94587F17E9C365D5, ped, x, y, z, distance, time, fleeType, fleeSpeed);
  • 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.

Enums and flags

Sources

alloc8or RDR3 NativeDB

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