RedM Natives

SET_FOCUS_POS_AND_VEL

Hash0x25F6EF88664540E2
Runtime nameSetFocusPosAndVel
NamespaceSTREAMING
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xBB7454BAFF08FE25

Signature

void SET_FOCUS_POS_AND_VEL(float x, float y, float z, float offsetX, float offsetY, float offsetZ);

Parameters

NameTypeDescription
xfloat—
yfloat—
zfloat—
offsetXfloat—
offsetYfloat—
offsetZfloat—

Returns void

Usage

Lua
SetFocusPosAndVel(x, y, z, offsetX, offsetY, offsetZ)

-- always works, by hash
Citizen.InvokeNative(0x25F6EF88664540E2, x, y, z, offsetX, offsetY, offsetZ)
JavaScript and C#
JavaScript
SetFocusPosAndVel(x, y, z, offsetX, offsetY, offsetZ);

// by hash
Citizen.invokeNative('0x25F6EF88664540E2', x + 0.0000001, y + 0.0000001, z + 0.0000001, offsetX + 0.0000001, offsetY + 0.0000001, offsetZ + 0.0000001);
C#
Function.Call((Hash)0x25F6EF88664540E2, x, y, z, offsetX, offsetY, offsetZ);
  • 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.