RedM Natives

TASK_LOOT_NEAREST_ENTITY

Hash0xCF1501CBC4059412
Runtime nameTaskLootNearestEntity
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207

Signature

void TASK_LOOT_NEAREST_ENTITY(Ped ped, float x, float y, float z, int p4, float p5);

Parameters

NameTypeDescription
pedPed—
xfloat—
yfloat—
zfloat—
p4int—
p5float—

Returns void

Usage

Lua
TaskLootNearestEntity(ped, x, y, z, p4, p5)

-- always works, by hash
Citizen.InvokeNative(0xCF1501CBC4059412, ped, x, y, z, p4, p5)
JavaScript and C#
JavaScript
TaskLootNearestEntity(ped, x, y, z, p4, p5);

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