_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.
0xF08E42BFA46BDFF8GetWaypointPositionSignature
BOOL _GET_WAYPOINT_POSITION(float* x, float* y);Parameters
| Name | Type | Description |
|---|---|---|
x | float* | — |
y | float* | — |
Returns BOOL
Description
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
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
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#
const [retval, x, y] = GetWaypointPosition();
// by hash
const [retval, x, y] = Citizen.invokeNative('0xF08E42BFA46BDFF8', Citizen.pointerValueFloat(), Citizen.pointerValueFloat(), Citizen.returnResultAnyway());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
InvokeNativewith the hash — it always works.
Examples
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.