RedM Natives

APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS

p6/relative - makes the xyz force not relative to world coords, but to something else p7/highForce - setting false will make the force really low

Hash0x31DA7CEC5334DB37
Runtime nameApplyForceToEntityCenterOfMass
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x18FF00FC7EFF559E

Signature

void APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(Entity entity, int forceType, float x, float y, float z, int component, BOOL isDirectionRel, BOOL isForceRel, BOOL p8);

Parameters

NameTypeDescription
entityEntity—
forceTypeint—
xfloat—
yfloat—
zfloat—
componentint—
isDirectionRelBOOL—
isForceRelBOOL—
p8BOOL—

Returns void

Description

p6/relative - makes the xyz force not relative to world coords, but to something else
p7/highForce - setting false will make the force really low

Usage

Lua
ApplyForceToEntityCenterOfMass(entity, forceType, x, y, z, component, isDirectionRel, isForceRel, p8)

-- always works, by hash
Citizen.InvokeNative(0x31DA7CEC5334DB37, entity, forceType, x, y, z, component, isDirectionRel, isForceRel, p8)
JavaScript and C#
JavaScript
ApplyForceToEntityCenterOfMass(entity, forceType, x, y, z, component, isDirectionRel, isForceRel, p8);

// by hash
Citizen.invokeNative('0x31DA7CEC5334DB37', entity, forceType, x + 0.0000001, y + 0.0000001, z + 0.0000001, component, isDirectionRel, isForceRel, p8);
C#
Function.Call((Hash)0x31DA7CEC5334DB37, entity, forceType, x, y, z, component, isDirectionRel, isForceRel, p8);
  • 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.