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
Hash
0x31DA7CEC5334DB37Runtime name
ApplyForceToEntityCenterOfMassNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x18FF00FC7EFF559ESignature
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
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
forceType | int | — |
x | float | — |
y | float | — |
z | float | — |
component | int | — |
isDirectionRel | BOOL | — |
isForceRel | BOOL | — |
p8 | BOOL | — |
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
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#
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);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.