RedM Natives

START_SHAPE_TEST_LOS_PROBE

Starts an asynchronous ray (line of sight) test; read it with GET_SHAPE_TEST_RESULT.

Hash0x7EE9F5D83DD4F90E
Runtime nameStartShapeTestLosProbe
NamespaceSHAPETEST
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x7EE9F5D83DD4F90E
Also known asSTART_SHAPE_TEST_RAY

Signature

ScrHandle START_SHAPE_TEST_LOS_PROBE(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Entity entity, int p8);

Parameters

NameTypeDescription
x1float—
y1float—
z1float—
x2float—
y2float—
z2float—
flagsint—
entityEntity—
p8int—

Returns ScrHandle

Description

alloc8or RDR3 NativeDB

Asynchronously starts a line-of-sight (raycast) world probe shape test.

Use the handle with 0x3D87450E15D98694 or 0x65287525D951F6BE until it returns 0 or 2.

p8 is a bit mask with bits 1, 2 and/or 4, relating to collider types; 4 should usually be used.

VORPCORE RDR3natives

Asynchronously starts a line-of-sight (raycast) world probe shape test.

Use the handle with 0x3D87450E15D98694 or 0x65287525D951F6BE until it returns 0 or 2.

p8 is a bit mask with bits 1, 2 and/or 4, relating to collider types; 4 should usually be used. flags used are mostly 83 and 3167

Verified notes

Reviewed in this portal's repository · by borderline-rp

The RedM runtime exposes this native as StartShapeTestRay (the older name), with the same arguments.

Flags and animals

The usual "world + vehicles + peds + objects" mask (1|2|4|8|16) hits human peds but not animals — horses included. Bit 4 does not cover animal peds. Use -1 to hit everything, then filter the entity yourself.

local handle = StartShapeTestRay(from.x, from.y, from.z, to.x, to.y, to.z, -1, PlayerPedId(), 0)
local _, hit, endCoords, _, entity = GetShapeTestResult(handle)

Verified in game on the Borderline RP server (third-eye targeting on horses), September 2026.

Usage

Lua
local retval = StartShapeTestLosProbe(x1, y1, z1, x2, y2, z2, flags, entity, p8)

-- always works, by hash
local retval = Citizen.InvokeNative(0x7EE9F5D83DD4F90E, x1, y1, z1, x2, y2, z2, flags, entity, p8, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = StartShapeTestLosProbe(x1, y1, z1, x2, y2, z2, flags, entity, p8);

// by hash
const retval = Citizen.invokeNative('0x7EE9F5D83DD4F90E', x1 + 0.0000001, y1 + 0.0000001, z1 + 0.0000001, x2 + 0.0000001, y2 + 0.0000001, z2 + 0.0000001, flags, entity, p8, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x7EE9F5D83DD4F90E, x1, y1, z1, x2, y2, z2, flags, entity, p8);
  • 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.

See also

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives · RedM Natives (verified notes)

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