ApplyForceToEntity — FiveM Natives
0xC5F68BE9613E2D18 · ENTITY · all
Applies a force to the specified entity. ``cpp enum eForceType { MinForce = 0, MaxForceRot = 1, MinForce2 = 2, MaxForceRot2 = 3, ForceNoRot = 4, ForceRotPlusForce = 5 } `` Research/documentation on the gtaforums can be found here and here.
Parameters
| Name | Type | Description |
|---|---|---|
| entity | Entity | The entity you want to apply a force on |
| forceType | int | Refer to `eForceType` |
| x | float | Force amount (X) |
| y | float | Force amount (Y) |
| z | float | Force amount (Z) |
| offX | float | Rotation/offset force (X) |
| offY | float | Rotation/offset force (Y) |
| offZ | float | Rotation/offset force (Z) |
| boneIndex | int | (Often 0) Entity bone index |
| isDirectionRel | BOOL | (Usually false) Vector defined in local (body-fixed) coordinate frame |
| ignoreUpVec | BOOL | (Usually true) |
| isForceRel | BOOL | (Usually true) When true, force gets multiplied with the objects mass and different objects will have the same acceleration |
| p12 | BOOL | (Usually false) |
| p13 | BOOL | (Usually true) |
Returns
void