ApplyForceToEntity — RedM Natives
0xC1C0855A · CFX · server
``cpp enum eApplyForceTypes { APPLY_TYPE_FORCE = 0, APPLY_TYPE_IMPULSE = 1, APPLY_TYPE_EXTERNAL_FORCE = 2, APPLY_TYPE_EXTERNAL_IMPULSE = 3, APPLY_TYPE_TORQUE = 4, APPLY_TYPE_ANGULAR_IMPULSE = 5 } `` This is the server-side RPC native equivalent of the client native APPLY_FORCE_TO_ENTITY.
Parameters
| Name | Type | Description |
|---|---|---|
| entity | Entity | The entity handle |
| forceType | int | The force type |
| x | float | The x component of the force to apply |
| y | float | The y component of the force to apply |
| z | float | The z component of the force to apply |
| offX | float | Offset from center of entity (X) |
| offY | float | Offset from center of entity (Y) |
| offZ | float | Offset from center of entity (Z) |
| nComponent | int | Component of the entity to apply the force too. Only matters for breakable or articulated (ragdoll) physics. 0 means the root or parent component |
| bLocalForce | BOOL | Specifies whether the force vector passed in is in local or world coordinates. `true` means the force will get automatically transformed into world space before being applied |
| bLocalOffset | BOOL | Specifies whether the offset passed in is in local or world coordinates |
| bScaleByMass | BOOL | Specifies whether to scale the force by mass |