# MAP::_GET_WAYPOINT_POSITION

- **Hash:** `0xF08E42BFA46BDFF8`
- **Namespace:** MAP
- **Runtime name (Lua/JS):** `GetWaypointPosition`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described with examples
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/MAP/_GET_WAYPOINT_POSITION

## Signature

```c
BOOL _GET_WAYPOINT_POSITION(float* x, float* y);
```

## Parameters

- `x` (`float*`)
- `y` (`float*`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Unlike `GET_WAYPOINT_COORDS` (0x29B30D07C3F7873B), which returns a single value, this native returns the x and y coordinates of the waypoint separately as float pointers.
Image: https://i.imgur.com/tu1jnY7.png

*Source: VORPCORE RDR3natives*

Unlike `GET_WAYPOINT_COORDS - 0x29B30D07C3F7873B`, which returns a single value, this native returns the x and y coordinates of the waypoint separately as floats from pointer. To retrieve each coordinate, `Citizen.PointerValueFloat()` must be used with this function.

## Usage

### Lua

```lua
local retval, x, y = GetWaypointPosition()

-- always available, by hash
local retval, x, y = Citizen.InvokeNative(0xF08E42BFA46BDFF8, Citizen.PointerValueFloat(), Citizen.PointerValueFloat(), Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, x, y] = GetWaypointPosition();

// by hash
const [retval, x, y] = Citizen.invokeNative('0xF08E42BFA46BDFF8', Citizen.pointerValueFloat(), Citizen.pointerValueFloat(), Citizen.returnResultAnyway());
```

### C#

```csharp
var x = new OutputArgument();
var y = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xF08E42BFA46BDFF8, x, y);
// x.GetResult<float>()
// y.GetResult<float>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

## Examples

*Source: VORPCORE RDR3natives*

```lua
local x,y = _GET_WAYPOINT_POSITION(Citizen.PointerValueFloat(),Citizen.PointerValueFloat())
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
