APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS
Applies a force to the entity's center of mass.
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); // 0x31DA7CEC5334DB37 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | forceType | int |
| 3 | x | float |
| 4 | y | float |
| 5 | z | float |
| 6 | component | int |
| 7 | isDirectionRel | BOOL |
| 8 | isForceRel | BOOL |
| 9 | p8 | BOOL |
Facts
| Name | APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS |
|---|---|
| Hash | 0x31DA7CEC5334DB37 |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
Citizen.InvokeNative(0x31DA7CEC5334DB37, -- APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS
PlayerPedId(), -- Entity entity
0, -- int forceType
0.0, -- float x
0.0, -- float y
0.0, -- float z
0, -- int component
false, -- BOOL isDirectionRel
false, -- BOOL isForceRel
false -- BOOL p8
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x31DA7CEC5334DB37", // APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS
PlayerPedId(), // Entity entity
0, // int forceType
0.0, // float x
0.0, // float y
0.0, // float z
0, // int component
false, // BOOL isDirectionRel
false, // BOOL isForceRel
false // BOOL p8
);Function.Call((Hash)0x31DA7CEC5334DB37, // APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS
API.PlayerPedId(), // Entity entity
0, // int forceType
0.0f, // float x
0.0f, // float y
0.0f, // float z
0, // int component
false, // BOOL isDirectionRel
false, // BOOL isForceRel
false // BOOL p8
);Related ENTITY natives
- APPLY_FORCE_TO_ENTITY
- ATTACH_ENTITY_TO_ENTITY
- ATTACH_ENTITY_TO_ENTITY_PHYSICALLY
- _GET_LAST_ENTITY_TO_DAMAGE_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT
- IS_ENTITY_ATTACHED_TO_ENTITY
- _ATTACH_ENTITY_TO_COORDS_PHYSICALLY
- _GET_ENTITY_WORLD_POSITION_OF_DIMENSIONS
- _GET_HEADING_OF_ENTITY_BONE
- _SET_ENTITY_ROTATION_PARALLEL_TO_LINE
- CLEAR_ENTITY_LAST_DAMAGE_ENTITY
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.