RedM Natives

APPLY_FORCE_TO_ENTITY

Hash0xF15E8F5D333F09C4
Runtime nameApplyForceToEntity
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xC5F68BE9613E2D18

Signature

void APPLY_FORCE_TO_ENTITY(Entity entity, int forceFlags, float x, float y, float z, float offX, float offY, float offZ, int boneIndex, BOOL isDirectionRel, BOOL ignoreUpVec, BOOL isForceRel, BOOL p12, BOOL p13);

Parameters

NameTypeDescription
entityEntity—
forceFlagsint—
xfloat—
yfloat—
zfloat—
offXfloat—
offYfloat—
offZfloat—
boneIndexint—
isDirectionRelBOOL—
ignoreUpVecBOOL—
isForceRelBOOL—
p12BOOL—
p13BOOL—

Returns void

Usage

Lua
ApplyForceToEntity(entity, forceFlags, x, y, z, offX, offY, offZ, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13)

-- always works, by hash
Citizen.InvokeNative(0xF15E8F5D333F09C4, entity, forceFlags, x, y, z, offX, offY, offZ, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13)
JavaScript and C#
JavaScript
ApplyForceToEntity(entity, forceFlags, x, y, z, offX, offY, offZ, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13);

// by hash
Citizen.invokeNative('0xF15E8F5D333F09C4', entity, forceFlags, x + 0.0000001, y + 0.0000001, z + 0.0000001, offX + 0.0000001, offY + 0.0000001, offZ + 0.0000001, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13);
C#
Function.Call((Hash)0xF15E8F5D333F09C4, entity, forceFlags, x, y, z, offX, offY, offZ, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13);
  • 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.