APPLY_FORCE_TO_ENTITY
Applies a force to the entity at an offset, with flags controlling the force type and whether direction and offset are relative.
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); // 0xF15E8F5D333F09C4 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | forceFlags | int |
| 3 | x | float |
| 4 | y | float |
| 5 | z | float |
| 6 | offX | float |
| 7 | offY | float |
| 8 | offZ | float |
| 9 | boneIndex | int |
| 10 | isDirectionRel | BOOL |
| 11 | ignoreUpVec | BOOL |
| 12 | isForceRel | BOOL |
| 13 | p12 | BOOL |
| 14 | p13 | BOOL |
Facts
| Name | APPLY_FORCE_TO_ENTITY |
|---|---|
| Hash | 0xF15E8F5D333F09C4 |
| 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(0xF15E8F5D333F09C4, -- APPLY_FORCE_TO_ENTITY
PlayerPedId(), -- Entity entity
0, -- int forceFlags
0.0, -- float x
0.0, -- float y
0.0, -- float z
0.0, -- float offX
0.0, -- float offY
0.0, -- float offZ
0, -- int boneIndex
false, -- BOOL isDirectionRel
false, -- BOOL ignoreUpVec
false, -- BOOL isForceRel
false, -- BOOL p12
false -- BOOL p13
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0xF15E8F5D333F09C4", // APPLY_FORCE_TO_ENTITY
PlayerPedId(), // Entity entity
0, // int forceFlags
0.0, // float x
0.0, // float y
0.0, // float z
0.0, // float offX
0.0, // float offY
0.0, // float offZ
0, // int boneIndex
false, // BOOL isDirectionRel
false, // BOOL ignoreUpVec
false, // BOOL isForceRel
false, // BOOL p12
false // BOOL p13
);Function.Call((Hash)0xF15E8F5D333F09C4, // APPLY_FORCE_TO_ENTITY
API.PlayerPedId(), // Entity entity
0, // int forceFlags
0.0f, // float x
0.0f, // float y
0.0f, // float z
0.0f, // float offX
0.0f, // float offY
0.0f, // float offZ
0, // int boneIndex
false, // BOOL isDirectionRel
false, // BOOL ignoreUpVec
false, // BOOL isForceRel
false, // BOOL p12
false // BOOL p13
);Related ENTITY natives
- APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS
- 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
- _SET_ENTITY_ROTATION_PARALLEL_TO_LINE
- CLEAR_ENTITY_LAST_DAMAGE_ENTITY
- DOES_ENTITY_BELONG_TO_THIS_SCRIPT
- FORCE_ENTITY_AI_AND_ANIMATION_UPDATE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.