RedM Natives

TASK_GOTO_ENTITY_OFFSET_XY

Hash0x338E7EF52B6095A9
Runtime nameTaskGotoEntityOffsetXy
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x338E7EF52B6095A9

Signature

void TASK_GOTO_ENTITY_OFFSET_XY(Ped ped, Entity entity, int duration, float targetRadius, float xOffset, float yOffset, float moveBlendRatio, int offsetFlags);

Parameters

NameTypeDescription
pedPed—
entityEntity—
durationint—
targetRadiusfloat—
xOffsetfloat—
yOffsetfloat—
moveBlendRatiofloat—
offsetFlagsint—

Returns void

Usage

Lua
TaskGotoEntityOffsetXy(ped, entity, duration, targetRadius, xOffset, yOffset, moveBlendRatio, offsetFlags)

-- always works, by hash
Citizen.InvokeNative(0x338E7EF52B6095A9, ped, entity, duration, targetRadius, xOffset, yOffset, moveBlendRatio, offsetFlags)
JavaScript and C#
JavaScript
TaskGotoEntityOffsetXy(ped, entity, duration, targetRadius, xOffset, yOffset, moveBlendRatio, offsetFlags);

// by hash
Citizen.invokeNative('0x338E7EF52B6095A9', ped, entity, duration, targetRadius + 0.0000001, xOffset + 0.0000001, yOffset + 0.0000001, moveBlendRatio + 0.0000001, offsetFlags);
C#
Function.Call((Hash)0x338E7EF52B6095A9, ped, entity, duration, targetRadius, xOffset, yOffset, moveBlendRatio, offsetFlags);
  • 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.