# CFX::GET_ENTITY_SPEED

- **Hash:** `0x9E1E4798`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetEntitySpeed`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_ENTITY_SPEED

## Signature

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

## Parameters

- `entity` (`Entity`) — The entity to get the speed of

## Returns

`float` — The speed of the entity in meters per second

## Description

*Source: Cfx.re native reference*

Gets the current speed of the entity in meters per second.

```
To convert to MPH: speed * 2.236936
To convert to KPH: speed * 3.6
```

## Usage

### Lua

```lua
local retval = GetEntitySpeed(entity)

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

### JavaScript

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

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

### C#

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

*Sources: Cfx.re native reference.*
