RedM Natives

_GET_WAYPOINT_POSITION

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.

Hash0xF08E42BFA46BDFF8
Runtime nameGetWaypointPosition
NamespaceMAP
SideClient
NameCommunity guess
Docs
Since build1207

Signature

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

Parameters

NameTypeDescription
xfloat*—
yfloat*—

Returns BOOL

Description

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

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
local retval, x, y = GetWaypointPosition()

-- always works, by hash
local retval, x, y = Citizen.InvokeNative(0xF08E42BFA46BDFF8, Citizen.PointerValueFloat(), Citizen.PointerValueFloat(), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, x, y] = GetWaypointPosition();

// by hash
const [retval, x, y] = Citizen.invokeNative('0xF08E42BFA46BDFF8', Citizen.pointerValueFloat(), Citizen.pointerValueFloat(), Citizen.returnResultAnyway());
C#
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

LUA · VORPCORE RDR3natives
local x,y = _GET_WAYPOINT_POSITION(Citizen.PointerValueFloat(),Citizen.PointerValueFloat())

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.