{"hash":"0x583AE9AF9CEE0958","ns":"TASK","name":"_TASK_VEHICLE_IS_HEADING_TO_COORDS","slug":"_TASK_VEHICLE_IS_HEADING_TO_COORDS","official":false,"named":true,"luaName":"TaskVehicleIsHeadingToCoords","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"vehicle","type":"Vehicle"},{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"z","type":"float"}],"summary":"Returns true if the vehicle's current drive-to task is targeting the given coordinates (i.e., its active destination matches x,y,z).","descriptions":[{"source":"alloc8or","format":"text","body":"Returns true if the vehicle's current drive-to task is targeting the given coordinates (i.e., its active destination matches x,y,z).\nUseful to avoid reissuing TASK_VEHICLE_DRIVE_TO_DESTINATION_2 when already en route."},{"source":"vorp","format":"text","body":"Returns true if the vehicle’s has a destination set previously set with `_TASK_VEHICLE_DRIVE_TO_DESTINATION_2` clear using `_CLEAR_VEHICLE_TASKS`"}],"examples":[],"aliases":["_TASK_VEHICLE_HAS_DESTINATION"],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/TASK/_TASK_VEHICLE_IS_HEADING_TO_COORDS","markdownUrl":"https://natives.borderlinerp.com/natives/TASK/_TASK_VEHICLE_IS_HEADING_TO_COORDS.md","snippets":{"lua":"local retval = TaskVehicleIsHeadingToCoords(vehicle, x, y, z)","luaInvoke":"local retval = Citizen.InvokeNative(0x583AE9AF9CEE0958, vehicle, x, y, z, Citizen.ReturnResultAnyway())","js":"const retval = TaskVehicleIsHeadingToCoords(vehicle, x, y, z);","jsInvoke":"const retval = Citizen.invokeNative('0x583AE9AF9CEE0958', vehicle, x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.returnResultAnyway());","csharp":"bool retval = Function.Call<bool>((Hash)0x583AE9AF9CEE0958, vehicle, x, y, z);","notes":["Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.","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."]}}