# ENTITY::GET_ENTITY_FORWARD_X

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

## Signature

```c
float GET_ENTITY_FORWARD_X(Entity entity);
```

## Parameters

- `entity` (`Entity`)

## Returns

`float`

## Description

Gets the X-component of the entity's forward vector.

## Usage

### Lua

```lua
local retval = GetEntityForwardX(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0xDB0954E9960F6457, entity, Citizen.ResultAsFloat())
```

### JavaScript

```js
const retval = GetEntityForwardX(entity);

// by hash
const retval = Citizen.invokeNative('0xDB0954E9960F6457', entity, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
```

### C#

```csharp
float retval = Function.Call<float>((Hash)0xDB0954E9960F6457, entity);
```

*Sources: alloc8or RDR3 NativeDB.*
