# SHAPETEST::START_SHAPE_TEST_LOS_PROBE

- **Hash:** `0x7EE9F5D83DD4F90E`
- **Namespace:** SHAPETEST
- **Runtime name (Lua/JS):** `StartShapeTestLosProbe`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described with examples
- **Since game build:** 1207
- **Other names:** `START_SHAPE_TEST_RAY`
- **URL:** https://natives.borderlinerp.com/natives/SHAPETEST/START_SHAPE_TEST_LOS_PROBE

## Signature

```c
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

- `x1` (`float`)
- `y1` (`float`)
- `z1` (`float`)
- `x2` (`float`)
- `y2` (`float`)
- `z2` (`float`)
- `flags` (`int`)
- `entity` (`Entity`)
- `p8` (`int`)

## Returns

`ScrHandle`

## Description

*Source: 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.

*Source: 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

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.

```lua
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

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

-- always available, by hash
local retval = Citizen.InvokeNative(0x7EE9F5D83DD4F90E, x1, y1, z1, x2, y2, z2, flags, entity, p8, Citizen.ResultAsInteger())
```

### JavaScript

```js
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#

```csharp
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

- [SHAPETEST::START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE](https://natives.borderlinerp.com/natives/SHAPETEST/START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE.md) — Does the same as 0x7EE9F5D83DD4F90E, except blocking until the shape test completes.
- [SHAPETEST::GET_SHAPE_TEST_RESULT](https://natives.borderlinerp.com/natives/SHAPETEST/GET_SHAPE_TEST_RESULT.md) — Returns the result of a shape test: 0 if the handle is invalid, 1 if the shape test is still pending, or 2 if the shape test has completed, and the handle should be invalidated.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives, RedM Natives (verified notes).*
