# ENTITY::GET_ENTITY_COORDS

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

## Signature

```c
Vector3 GET_ENTITY_COORDS(Entity entity, BOOL alive, BOOL realCoords);
```

## Parameters

- `entity` (`Entity`)
- `alive` (`BOOL`)
- `realCoords` (`BOOL`)

## Returns

`Vector3`

## Description

Gets the current coordinates for a specified entity.
`entity` = The entity to get the coordinates from.
`alive` = Unused by the game, potentially used by debug builds in order to assert whether or not an entity was alive.

If entity is a ped and it's in a vehicle or on a mount the coords of that entity are returned. Set 'realCoords' to true when you need the true ped coords.

## Usage

### Lua

```lua
local retval = GetEntityCoords(entity, alive, realCoords)

-- always available, by hash
local retval = Citizen.InvokeNative(0xA86D5F069399F44D, entity, alive, realCoords, Citizen.ResultAsVector())
```

### JavaScript

```js
const retval = GetEntityCoords(entity, alive, realCoords);

// by hash
const retval = Citizen.invokeNative('0xA86D5F069399F44D', entity, alive, realCoords, Citizen.returnResultAnyway(), Citizen.resultAsVector());
```

### C#

```csharp
Vector3 retval = Function.Call<Vector3>((Hash)0xA86D5F069399F44D, entity, alive, realCoords);
```

## See also

- [ENTITY::SET_ENTITY_COORDS](https://natives.borderlinerp.com/natives/ENTITY/SET_ENTITY_COORDS.md)

*Sources: alloc8or RDR3 NativeDB.*
