WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT
Hash
0xB629A298081F876FRuntime name
WaypointRecordingGetClosestWaypointNamespaceTASK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0xB629A298081F876FSignature
BOOL WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT(const char* waypointRecording, float x, float y, float z, int* point);Parameters
| Name | Type | Description |
|---|---|---|
waypointRecording | const char* | — |
x | float | — |
y | float | — |
z | float | — |
point | int* | — |
Returns BOOL
Usage
local retval, point = WaypointRecordingGetClosestWaypoint(waypointRecording, x, y, z, point)
-- always works, by hash
local retval, point = Citizen.InvokeNative(0xB629A298081F876F, waypointRecording, x, y, z, Citizen.PointerValueIntInitialized(point), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, point] = WaypointRecordingGetClosestWaypoint(waypointRecording, x, y, z, point);
// by hash
const [retval, point] = Citizen.invokeNative('0xB629A298081F876F', waypointRecording, x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.pointerValueIntInitialized(point), Citizen.returnResultAnyway());var point = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xB629A298081F876F, waypointRecording, x, y, z, point);
// point.GetResult<int>()- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.