# ENTITY::APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS

- **Hash:** `0x31DA7CEC5334DB37`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `ApplyForceToEntityCenterOfMass`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS

## Signature

```c
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

- `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

### Lua

```lua
ApplyForceToEntityCenterOfMass(entity, forceType, x, y, z, component, isDirectionRel, isForceRel, p8)

-- always available, by hash
Citizen.InvokeNative(0x31DA7CEC5334DB37, entity, forceType, x, y, z, component, isDirectionRel, isForceRel, p8)
```

### JavaScript

```js
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);
```

### C#

```csharp
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. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

*Sources: alloc8or RDR3 NativeDB.*
