_FIND_CLOSEST_GPS_POSITION
Finds the closest GPS-routable position to the given coordinates, writes it to outPosition and returns true on success.
Signature
BOOL _FIND_CLOSEST_GPS_POSITION(float x, float y, float z, Vector3* outPosition); // 0x3FDA2B79AEEE351C b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x | float |
| 2 | y | float |
| 3 | z | float |
| 4 | outPosition | Vector3* (out pointer) |
Facts
| Name | _FIND_CLOSEST_GPS_POSITION |
|---|---|
| Hash | 0x3FDA2B79AEEE351C |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result, outPosition = Citizen.InvokeNative(0x3FDA2B79AEEE351C, -- _FIND_CLOSEST_GPS_POSITION
0.0, -- float x
0.0, -- float y
0.0, -- float z
Citizen.PointerValueVector(), -- Vector3* outPosition
Citizen.ReturnResultAnyway()
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const [result, outPosition] = Citizen.invokeNative("0x3FDA2B79AEEE351C", // _FIND_CLOSEST_GPS_POSITION
0.0, // float x
0.0, // float y
0.0, // float z
Citizen.pointerValueVector(), // Vector3* outPosition
Citizen.returnResultAnyway()
);
if (result) {
// ...
}var outPositionArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x3FDA2B79AEEE351C, // _FIND_CLOSEST_GPS_POSITION
0.0f, // float x
0.0f, // float y
0.0f, // float z
outPositionArg // Vector3* outPosition
);
Vector3 outPosition = outPositionArg.GetResult<Vector3>();Related MAP natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.